| 
 Posted by Abersparky on 02/27/07 05:31 
Can anyone help me out here... 
 
I can't quite seem to get this right.  I have a table of which I need 
to extract data based on two fields: entry_id and vis.  The below 
results in error.  When I remove the second condition from the WHERE 
statement, it counts the entry id as "comnumrows". 
 
Is my SELECT statement wrong??? 
 
	$comvis = "N"; 
	$comquery = mysql_query("SELECT * FROM comments WHERE (entry_id = 
$id  AND vis = $comvis)"); 
	$comquery_data = mysql_fetch_row($comquery ); 
	$comnumrows = $comquery_data[0]; 
	print $comnumrows . " comments";
 
  
Navigation:
[Reply to this message] 
 |