/** * Execute a query and fetch all results * * This function performs the same function as Database::prefetch(), * but returns an array of regular integer-indexed arrays. It is * faster for cases when the names of the columns are not known to the * query planner in advance of their execution (eg: 'SELECT * FROM * table'). * * @param string $str The query string * @param array $params The query paramters * @param string $name The query name * @throws DatabaseException * @return array */ public static function prefetch_int($str, $params = array(), $name = null) { $ret = array(); $r = Database::query($str, $params, $name); while ($row = pg_fetch_row($r)) { $ret[] = $row; } return $ret; }