It shouldn't take a lot of code to put results into an array:
$query = "select * from table";
$r = mysql_result($query);
while ($row = mysql_fetch_object($r))
$hold[] = $row;
(OR, to index by some id field in the database:)
$hold[$row->id] = $row;
mysql_free_result($r);
Total of 5 lines.
--
I use the PEAR db http://pear.php.net/manual/en/package.database.php
This returns arrays - examples here
http://pear.php.net/manual/en/package.database.db.intro-fetch.php
look at the Quick data retreaval down the page
pete
Larry Brown wrote:
Is there any php function to pull a query into an arra
2 matches
Mail list logo