Page 1 of 1

Counting Data

Posted: Sat Jun 08, 2002 9:41 am
by FatBoy666
Hi, I'm working on a counter.
I want the MySQL database to count rows with a specific content and then the number should be printed on the page.
My problem now is that I'm not very good with MySQL commands, so I don't know what command I have to use for counting rows.
I would be pleased for every suggestion.

Counting stuff

Posted: Sat Jun 08, 2002 3:15 pm
by BDKR
It should be count(). Check the manual at mysql.com/doc. However, it should be as simple as
select count(*) as total from table_name where something = something_else
You could also run the query and use the mysql_num_rows() function. Both should get you
into the ballpark.

Later on,
Big Din K.R.