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 'AND item_id = v.id AND v.video_status=5)' at line 1 file:/var/www/html/glazz.ru/include/stuff.php:26
SELECT count(*) FROM video v WHERE video_status=5 AND lesson != -1 AND in_festival = 'on' AND in_top20=''  AND (SELECT count(*) FROM tag_item WHERE tag_id =  AND item_id = v.id AND v.video_status=5)
die by sql flag