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 SELECT....WHERE for the results I
> actually want to see, is there some more efficient way of getting the
> total number of rows in a particular table? It just seems like doing
> two searches would be a waste of time.... or am I wrong?
>
> The information is there in SHOW TABLE STATUS, but I don't know how
> to get it out. I didn't find anything else at mysql.com or in any of
> my books that helped here. I'm using PHP for the interface.
>
> I've thought about storing a few bits of information like that in a
> separate table (that would be updated once a day), but don't know if
> that would be more efficient.
>
Lotta busy-work for not checking the manual
mysql_numrows();
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
---------------------------------------------------------------------
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