MySQL query being performed when PHP if condition not met?
- by Ryan
The script I'm using is
if($profile['username'] == $user['username']) {
$db->query("UPDATE users SET newcomments = 0 WHERE username = '$user[username]'");
echo "This is a test";
}
(Note that $db-query is exactly the same as mysql_query)
For some very odd reason, the MySQL query is being performed even if the defined condition is…