Just replace SELECT * FROM with SELECT COUNT(*) FROM this
will return the
number of rows
Simon
-----Original Message-----
From: phpmysql googlegroups.com [mailto:phpmysql googlegroups.com] On Behalf
Of Ankh
Sent: 29 July 2006 17:29
To: PHP & MySQL
Subject: How to get the number of a certain record
only?(using MySQL)
Hi all,
How to get the number of a certain kind of records only, not
the other
fields i dont want?
I know I can get the number records using "select *
from table ..." and
then use mysql_num_rows() to know how many records was
selected, but is
there a quicker way that i can get the numbers without
having to
"select" all of the records first?
Thanks for suggestions!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysql googlegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribe googlegroups.com
For more options, visit this group at http://groups
.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---
|