Howto: Get Number of Rows

Howto: Get Number of Rows

If you have a MySQL table and you want to know how many records there are in this table you can run a query on the entire table for example:

This will show you how many rows were supplied in that query. So if you want to find out how many people are under 18 in your forums you could do something like this:

The time gap gets the time in seconds of 18 years, then subtracts it from the time now. Yay. so now you can limit access to minors :O

Posted by VoiDeT

Categorised under PHP
Bookmark the permalink or leave a trackback.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

or