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 'AND selection_id_i = 38' at line 4
SELECT id_i FROM profilecontent WHERE profile_id_i = AND selection_id_i = 38