Quote:
Originally posted by nwlinkvxd
lmao, it's so easy you'll want to strangle yourself
given your comments table for blog ID number 15
PHP Code:
$query = "SELECT * FROM blog_comments_table WHERE blog_ID = '15'";
$result = mysql_query($query);
$numberOfRows = mysql_num_rows($result);
Hope I did the php tags right.
|
Looks about right. You might want to do a little error catching:
PHP Code:
$result = mysql_query($query);
if(!$result){
echo "Error: ".mysql_error();
}
else {
$numRows = mysql_num_rows($result);
}
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
Last edited by sailor; 08-10-2004 at 10:52 AM..
|