I need something like this:
SELECT * FROM `table` WHERE '123' IN (`column`)
In 'column' (varchar 255 field) there are some numbers like 1, 50, 145, 123, 58,
I don't know to explain better, but I think you understand what I need.
I need something like this:
SELECT * FROM `table` WHERE '123' IN (`column`)
In 'column' (varchar 255 field) there are some numbers like 1, 50, 145, 123, 58,
I don't know to explain better, but I think you understand what I need.
SELECT * FROM table WHERE FIND_IN_SET('123', column);
See http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_find-in-set
SELECT * FROM table WHERE column LIKE '%123%';
column result somewhere along the line and test them. If you use LIKE to return a set with some extra rows, your post processing may be easy with PHP, or you will have to write a function in MySQL to do that for your. I'm sorry but I have not time to make it now. Here is a fine beginning example.[blog.fedecarg.com/2009/02/22/mysql-split-string-function/]