php - mysql_num_rows() expects parameter 1 to be resource boolean given in -


what wrong query?

$check_select = mysql_num_rows(mysql_query("select * `user` user_id = '$user_fbid'")); if($check_select > 0){     mysql_query("insert `user` (user_id, name, photo) values ('$user_fbid', '$user_fnmae', '$user_image')"); } 

it returned mysql_num_rows() expects parameter 1 resource, boolean given in

$row = mysql_query("select * user user_id = '{$user_fbid}'"); $check_select = mysql_fetch_array($row);  if($check_select > 0){     mysql_query("insert user (user_id, name, photo) values ('{$user_fbid}', '{$user_fnmae}', '{$user_image}')"); } 

and stop work mysql! work mysqli or pdo


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? -