Counting Rows
You might want to be able to count the number of rows within a database table to show useful information to users. This has been done on the Tutorials Index on Olate to show how many tutorials are available. It is very easy to do with only a few lines of code because PHP has a built in row (or record) counting function - mysql_num_rows.
Views: 1097 | | by Source
View this tutorial