Welcome to WebmasterWorld Guest from 126.96.36.199
select * from table where id=3
id field contains
this will select Orange but not Green, is it possible to select green aswell? and id=2 will still select Green?
ill try and explain better
i have a table with id field
but i have a few rows that need to have 2 or 3 ids for example
i am selecting with where id=$id and need an id of 3 to select that row as well as an id of 34 etc
i tried IN ($id,$id) but this found nothing, im probably doing it wrong somewhere, still learning thank you for your patience.
Right? So use the wildcard % :
SELECT * FROM bananas WHERE id = '%3%'
% means "match ANYTHING", so it will match 3, 23, 32, 223,232,a3a, etc.
You can also use *, which means "Match ONE OF".
Exact wildcards may change from DB to DB, so if you get a strange error double check to make sure it works on your ODBC.