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 'and pops.id=id_pop and pops.active="Y" and date_format(show_from,"%Y%m%d")<=202' at line 6


SELECT
*
FROM
pops,pops_languages
WHERE
id_language= and pops.id=id_pop and pops.active="Y"
and date_format(show_from,"%Y%m%d")<=20240420 and 20240420<=date_format(show_to,"%Y%m%d")






LIMIT 1

;