For new queries (where using the data object is unsuitable), we can do something like this:

```php
$statement = gGetDb()->prepare($query);
$statement->execute();
$resultset = $statement->fetchAll(PDO::FETCH_ASSOC);
```

This should give you an array of associative arrays.

- [gGetDb()->prepare()](http://uk3.php.net/manual/en/pdo.prepare.php)
- [$statement->fetchAll()](http://uk3.php.net/manual/en/pdostatement.fetchall.php)
- [$statement->fetch()](http://uk3.php.net/manual/en/pdostatement.fetch.php)
- [Parameters in queries](http://uk3.php.net/manual/en/pdostatement.bindparam.php)