Hello, i need a little help, i have this table in mysql: Table Name: files Field Type --------- --------- id int(11) name varchar(155) url varchar(155) in text Data: files id name url in -- ------ ---- ------------- 1 file 1 url1 1,2,3,5,6 2 file 2 url2 2,4,5,1,9 3 file 3 url3 1,3,9 4 file 4 url4 3,5,6,7 Code (markup): Now I want to select only the rows that have '9' in the 'in' field i want to know if i can select from just one query Can anyone help me out in this ?
select * from files where `in` LIKE '%,9,%' OR `in` LIKE '%,9' OR `in` LIKE '9,%' OR `in` LIKE '9' Code (markup):