Is there some way to take the following 2 queries & make them into one ?

I want to be able to in one query get the # of overall rows and do a LIMITed result 
set to get the first NN rows.

Is it possible to to do this in one query ? Presumable MySQL has to figure out what 
the overall # is to return the limited result set so it'd be more efficient to do this 
all at once.

thanks,

- Sam.

SELECT COUNT(*) FROM posts WHERE group_id=1;

SELECT post_subject FROM posts WHERE group_id=1 LIMIT 10,10;

 



---------------------------------
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year!
http://personal.mail.yahoo.com/

Reply via email to