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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -