RE: total rows in table?

2001-07-08 Thread Don Read
On 08-Jul-01 Nelson Goforth wrote: I'd like to include a line in certain output lists like this: Showing 97 contacts out of 324 Other than doing a SELECT...FROM CONTACTS and getting the count from that result and THEN doing a SELECTWHERE for the results I actually want to see,

RE: total rows in table?

2001-07-08 Thread Nelson Goforth
I thought mysql_numrows(result_identifier) - which I'm using to get the number of rows in the found set - was ONLY to get the number of rows in the result set. What I'm after is how to get the number of rows in an entire table without doing a search to find everything in the table (concerned

RE: total rows in table?

2001-07-08 Thread Don Read
On 08-Jul-01 Nelson Goforth wrote: I thought mysql_numrows(result_identifier) - which I'm using to get the number of rows in the found set - was ONLY to get the number of rows in the result set. What I'm after is how to get the number of rows in an entire table without doing a search to

Re: total rows in table?

2001-07-08 Thread joseph . bueno
Hi, SELECT COUNT(*) FROM TABLE; will give you the number of rows in the entire table. Don't worry about performance, this query is optimized by mysql. Check: http://www.mysql.com/doc/W/h/Where_optimizations.html for details Regards -- Joseph Bueno NetClub/Trader.com Nelson Goforth wrote: I