In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> in ym search page, i construct a sql query from user input to search my
> database, and i run this query to get totalresults. Then run another query
> with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per
> page. My question is, is this inefficient? is there any better way i dont
> know of? or does the 2 queries not mka emuch of a difference
> 

You might consider running the first query just to get a COUNT(), rather 
than extracting all the resulting rows and using mysql_numrows to 
determine how many were returned

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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

Reply via email to