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 'day%')) AND s.base = 'pornstudios' AND d.base = 'pornstudios' AND d.id != '' ORD' at line 1 -> SELECT d.id,d.releaseDate,d.coverUrl,d.title,d.pic_lu FROM data_fame.dvds d INNER JOIN data_fame.scenes s ON s.dvdid = d.id WHERE s.releaseDate <= '2024-12-21' AND s.pic_lu=1 AND s.studio = 'Tushy' AND (LOWER(s.categories_en) LIKE LOWER('%valentine's day%')) AND s.base = 'pornstudios' AND d.base = 'pornstudios' AND d.id != '' ORDER BY rand() LIMIT 0,1