Re: [PHP-DB] Re: Efficiency question

2003-06-27 Thread Micah Stevens
Peter and Hugh, The queries are already mostly optimized. I just was using that one as an example. I'll be going through them and tweaking them, but know that about the variable assignments helps for sure. Thanks! On Thu June 26 2003 10:49 pm, Peter Beckman wrote: Since this is the PHP DB

[PHP-DB] Re: Efficiency question

2003-06-26 Thread Hugh Bothwell
Micah Stevens [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $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

Re: [PHP-DB] Re: Efficiency question

2003-06-26 Thread Peter Beckman
Since this is the PHP DB list, I can tell you this -- you would be better off performance-wise replacing the * in select * from and replacing it with a list of the columns (even if it is all of them) than you would putting all of that on one line. $r = rand(0,7)*-1; $s = abs($r); is as fast as