SELECT vid_id FROM videos WHERE 1 AND (converted='1' OR youtube_url!='') AND broadcast = 0 AND approved='1' AND (( tags LIKE '%||%')) ORDER BY CASE WHEN ( tags LIKE '%||%' ) THEN 0 WHEN () THEN 3 ELSE 4 END LIMIT 0,12:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') THEN 3 ELSE 4 END LIMIT 0,12' at line 1