Yes 

Use SQL_CALC_ROWS
And then SELECT FOUND_ROWS()


> -----Original Message-----
> From: William Wang [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 06, 2004 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: use LIMIT and get total count
> 
> Hi,
> 
> In MySQL, I do:
> 
> mysql> SELECT * FROM my_table WHERE myconditions LIMIT
> 10;
> 
> It retrieves 10 rows of data that meets 'myconditions'
> from my_table. Is it possible to get the total row
> count that meets 'myconditions' without another query?
> Thanks.
> 
> Dexin
> 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
> http://hotjobs.sweepstakes.yahoo.com/careermakeover
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to