how to count results?
Posted 29 April 2006 - 05:55 AM
Posted 29 April 2006 - 10:58 AM
because i want for example to show how many results there are.I have category design lets say and on the left i want to know how many are the articles in it.I use this
"Select * from articles where cat_id=...."
And then how to show how many are the articles from this category
Posted 29 April 2006 - 12:13 PM
<?php $q = "Select * from articles where cat_id=...."; $rs = mysql_query($q) or die('Problem with query: ' . $q . '<br>' . mysql_error()); $n = mysql_num_rows($rs); echo $n; ?>
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users