SELECT product_id FROM biblio_products_genres_links WHERE genre_id IN (, 44) order by rand() limit 20 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 ' 44) order by rand() limit 20' at line 3