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 'catid) AND `alias` = 'categoriaprueba'' at line 3 SQL=SELECT `id` FROM web_content WHERE FIND_IN_SET(,catid) AND `alias` = 'categoriaprueba'