Efficiency question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would guess that:

$data = mysql_fetch_assoc(mysql_query("select * from some_table limit 1"));

would be faster than:

$pointer = mysql_query("select * from some_table limit 1");
$data = mysql_fetch_assoc($pointer);

but I'm not sure, php may optimize this. Anyone know the answer?

I'm taking over some code that someone else made that has a lot of one record 
retrevals coded in it, like option 2, and I was wondering if it was worth my 
time to change it. 

Thanks!
-Micah


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux