I’m running the following query but $new returns 0:
$count = mysql_query("SELECT COUNT(*) FROM flagged WHERE status=0") or die(mysql_error());
$new = mysql_fetch_row($count);
if ($new != 0) {
echo "<script language=\"javascript\">$.titleAlert(\"New Logs - ($new[0])\");</script>";
}
Problem is the if-condition keeps getting met when it shouldn’t when $new != 0
I even tried:
if ($new > 0) {
//update title about new logs
}
Either way, the title is still updated and I’m not sure why.
New Logs – (0)
just do
and you’ll see why your
ifdoesn’t work