Let's say I have a form that has 30 checkboxes that correspond to music genres (it submits to a PHP form handler).
I have an artists table that has a genre field. What are the best practices on building a query that would behave along the lines of:
Select name FROM artists WHERE genreId = 1 OR genreId = 2 OR . . . etc etc. Where the genreId's are chosen from checkboxes.
I know I can dynamically build my WHERE clause in PHP, but I'm in the habit of using prepared statements and stored procedures. What should I do?