My mysql query is not updating my database correctly can some one help me fix this problem I think it has something to do with the JOIN.
Here is my mysql query.
"UPDATE users
SET users.last_login = NOW()
FROM users JOIN info ON info.user_id = users.user_id
WHERE (info.email = '" . $e . "' OR users.username = '" . $e . "')
AND users.password = '" . $sha512 . "'
AND users.active IS NULL"
Here is the working query before I used the JOIN.
"UPDATE users SET last_login = NOW() WHERE (email = '" . $e . "' OR username = '" . $e . "') AND password = '" . $sha512 . "' AND active IS NULL"