ok, if you are reading this post, im hoping you are here because you want to count how many rows are in your database with a specific value.

lets say you have a wallpaper website and you want to know how many times a member of your website has submitted a wallpaper.

well you can use this query example for counting the number of times the user "wallpaperama" has submitted a wallpaper.
you have a database able which is called "usersdb".

is the "usersdb" database, you have a field called "userid"

the "userid" for "wallpaperama" is equals to "345"

now that you have this information, you can send this query:


$sql = "SELECT COUNT(userid) AS TOTAL FROM users WHERE userid='345'";

$results = $myrwow['userid'];



when you execute this query, it will show you the number of times

hope this helps