hi form users following error: unknown column 'c63rd321' in 'where clause' works 1 user doesn't other users ideas?
$query = 'select first_name,last_name,is_admin '.$database.'.users users.id='.$user_id.' limit 1'; do need add users.id="" why work 1 user , not others
looks $user_id string ("c63fb321") , not integer. use quotes (and escape!)
$query = 'select first_name,last_name,is_admin '.$database.'.users users.id="'.mysql_real_escape_string($user_id).'" limit 1'; (assuming mysql_ functions here, applies pdo , mysqli well)
Comments
Post a Comment