if all you are looking to do is find a row in your recordset which includes one of the numbers, you could use the MySQL operator IN
"SELECT * FROM courses WHERE id IN ('1', '5', '10', '14')"
if the parameters are integers rather than strings you may not need the inverted commas
tutorial_mysql_in_and_between.php3