Closed (fixed)
Project:
Drupal core
Version:
5.1
Component:
database system
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2007 at 16:47 UTC
Updated:
21 Sep 2009 at 14:00 UTC
I'm search for funtcion in drupal for getting a resultset from the db result if multiple rows comes from a select statement... But i can't find any...:) So i've written one for me, if it is useable, and ok put it into the next version:) If not, its good for me too.
I've put theese to my includes/database.inc file:
function db_fetch_object_resultset($query_result){
$ret=FALSE;
if (db_num_rows($query_result)){
while($ret[]=db_fetch_object($query_result));
array_pop($ret);
}
return $ret;
}
Comments
Comment #1
willmoy commentedIn D7 ->fetchAllAssoc() from DBTNG handles this.