RE: counting on a complex query

2007-08-01 Thread Jerry Schwartz
Will SELECT SQL_CALC_FOUND_ROWS and SELECT FOUND_ROWS() do what you want? Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com

Re: counting on a complex query

2007-08-01 Thread Perrin Harkins
On 8/1/07, Jerry Schwartz [EMAIL PROTECTED] wrote: Will SELECT SQL_CALC_FOUND_ROWS and SELECT FOUND_ROWS() do what you want? Be careful. While it will give the correct number of rows that would have been found if LIMIT had not been used, it makes the server compute the whole result set,

Re: counting on a complex query

2007-08-01 Thread Les Fletcher
SQL_CALC_FOUND_ROWS isn't an option for us. Right now I am doing two queries, but I am just trying to see if there is a better way to do the count query than to just turn it into a dervied table and count the results i.e. SELECT COUNT(*) FROM (big nasty query) t1. I think what the question

Re: counting on a complex query

2007-08-01 Thread Perrin Harkins
On 8/1/07, Les Fletcher [EMAIL PROTECTED] wrote: SQL_CALC_FOUND_ROWS isn't an option for us. Right now I am doing two queries, but I am just trying to see if there is a better way to do the count query than to just turn it into a dervied table and count the results i.e. SELECT COUNT(*) FROM