mysql - Is value in a string stored in table -
i have table t1 several columns. 1 of them contains string of numeric values, , can single number, 14 or comma separated, 3, 14, 66, 1884
i need run query check if given number in column. thought i'll use "in", don't think it'll right approach. reason having brain-freeze, possibly because it's been loooooong day , caffeine wore out...
select * t1 ".$myvalue." in (t1.mystr) ...?
you use find_in_set function.
select * t1 find_in_set(?, mystr)
Comments
Post a Comment