[UPHPU] get count of database records matching criteria

Wade Preston Shearer lists at anavidesign.com
Fri Feb 25 21:43:37 MST 2005

What is the most efficient way to get a count of the number of rows in 
a MySQL database that match a certain criteria?

For example, let's assume we have a database containing the following 
columns: name, age, weight. I want to have a numerical count of how 
many rows in the database contain a record of someone that is 55 years 
old. So, it will be counting only a portion of the entire table.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2371 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20050225/41a84ea4/smime.bin

More information about the UPHPU mailing list