hello, I been looking all night but I cannot figure this out.
I have this script where one of the rows in a mysql table is
named "type" tinyint(3)
now when a person joins the site they have a basic membership and their data is 0 in the type row
when they become silver members it is 1
and gold is 2 all 3 numbers are entered into that one row for each member depending on what kind of membership they have.
Hopefully this makes sense. LOL
what I want to do is echo each type of membership on a page by the total number of each type
so say there is 100 basic memberships
then it would add up all the 0's within the row in the mysql database and then echo that total.
I have already gotten it to display total number of users by adding
$query = "select id from user";
$result = MYSQL_QUERY($query);
and then having <?print $totalusers;?> where ever I want it to echo.
How can I do the same with the memberships? I have a feeling that it would have something to do with $totalusers=mysql_num_rows($result); i need to change mysql_num_rows to something else?