Error: 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 ')
ORDER BY `rate_score` DESC, `rates` DESC LIMIT 0, 20' at line 5
in query: "SELECT `photo_id`,`profile_id`,`index`,`rate_score`,`rates`
FROM `skadate_profile_photo`
WHERE `status`="active" AND `publishing_status`="public" AND `rates`>=5
AND `profile_id` IN (SELECT `profile_id` from `skadate_profile`
WHERE `sex` = )
ORDER BY `rate_score` DESC, `rates` DESC LIMIT 0, 20"
debug string: ""