You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR uid IN (SELECT fid FROM friends WHERE uid = ))' at line 1
SELECT uid FROM profile_settings WHERE movement = 1 AND (uid IN (SELECT uid FROM friends WHERE fid = ) OR uid IN (SELECT fid FROM friends WHERE uid = ))