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 ' tags)' at line 1syntax error: SELECT count(id) AS numrows FROM table_product where find_in_set( , tags)