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 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 that this a waste of processor time).
> 
> However, I did try it without argument as you suggest, but got an
> error message (wrong parameter count).
> 
> Nelson
> 
> At 10:32 AM -0500 7/8/01, Don Read 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 SELECT....WHERE for the results I
> >
> >Lotta busy-work for not checking the manual
> >
> >mysql_numrows();
> >

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to