i got this code
while ($aResult = mysql_fetch_array($result))
{
$sResult[$aResult[userID]] = $aResult;
}
but i want to know is there a faster way to put everything from $aresult in the sresult global?
|
It depends on the definition of "faster". If you want minimum CPU usage, you propably should use the function above, or as Col. said, try to avoid fetching all and use pointers. If you want less coding time, consider using a a wrapper such as PEAR DB. With it you can just write $res = $db->getAll( $SQL ); http://pear.php.net/manual/en/package.database.db.db-common.getall.php |
|||
|