how can you make MySQL get results relating to more than 1 id(s)(say like 5, 45, 6)
Printable View
how can you make MySQL get results relating to more than 1 id(s)(say like 5, 45, 6)
select * from table_name where id = 5 or id = 45 or id = 6
that was what i first tried when i needed to do this in the first place but it returned no results.
Are the ID's string or numerical data type in the database?
Or, where id in(5, 45, 6). If it doesn't work you'll have to give us more to go with.
sorry for replying late...
the id's are numerical in the database.Quote:
Originally Posted by kfcSmitty
reply #2 and reply #5 both give you a solution.
yes it does... thanks
just wanted to reply to kfcSmitty's post