Menu
COUNT not working.
Getting this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘read = ‘0” at line 1
My Code:
<?php
$num = mysql_query(“SELECT COUNT(id) FROM emails WHERE user_id = ‘$username’ AND read = ‘0’”)or die(mysql_error());
while($count = mysql_fetch_array($num))
{
echo “(<strong> “.$count[‘COUNT(id)’].” </strong>)”;
}
?>
Any Suggesstions?