mysql: select ... where id = any value. is it possible?
- by Syom
look at this table please
table
|id| |name| |order|
i must get the rows, where name = something and order = somevalue
so i write
select `id` from `table` where `name` = 'something' and `order` = 'somevalue'
but depend on php logic, sometimes i need to get all rows, where name = somethimg, independently of order value. i don't want to change the query structure, because in practise there are many number of fields, and possible count of queries will became very big. so i want to save the structure of query, and when i need to select just by name, i want to write something like this
select `id` from `table` where `name` = 'something' and `order` = any value
is it possible?
maybe the question is incomprehensible, at least i tried;)
sorry for bad english
thanks