php - Syntax error MySQL server version for the right syntax to use near 'WHERE `username`= 'jay'' -
i have been trying figure out right syntax use can't seem figure out. part of code think being affected.
private function _check_db($username, $password) { global $db; $user_row = $db->get_row("select * `user`, `username`= '". $db->escape($username) ."'"); //general return if(is_object($user_row) && md5($user_row->password) == $password) return true; else return false; }
change
$user_row = $db->get_row("select * `user`, `username`= '". $db->escape($username) ."'");
to
$user_row = $db->get_row("select * `user` `username`= '". $db->escape($username) ."'");
Comments
Post a Comment