php - mysql_num_rows() expects parameter 1 to be resource boolean given in -
this question has answer here:
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
Post a Comment