View Single Post
Old 08-09-2004, 04:56 AM   #5 (permalink)
sailor
beauty in the breakdown
 
Location: Chapel Hill, NC
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..
sailor is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43