I have a table in MySQL database. In that table there is a text field called ‘selection’ that hold numbered values, separated by a pipe char (example: 44|5|23|546|…..). I also have a php array: $values = array(63,35,7,5);
I need to refer to the ‘selection’ field as array of options (separated by ‘|’) and select only the rows that contain at least one of the number in $values array.
I hope i explained my problem accurately enough, because my English is very poor… Thanks.
If you want to get row that contains at least one number in
$valuesarray, the SQL looks like this: