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 weight>5 UNION (SELECT * FROM movie_embeds WHERE movie_id= and weight=5 LIMI' at line 1