MySQL Error: 1064: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 '' at line 1 for query SELECT m.*,(SELECT codec FROM coding_profiles WHERE id = m.profile_coding) as codec,(SELECT codec FROM coding_profiles WHERE id = m.profile_mobile_coding) as mobile_codec,(SELECT codec FROM coding_profiles WHERE id = m.profile_3gp_coding) as 3gp_codec FROM movies m WHERE m.id= MySQL Error: 1064: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 '' at line 1 for query UPDATE movies SET status='error',error_status='Coding profile not found.',changed='1' WHERE id= Coding profile not found.