This is an example of a string inserted into a mysql db field after a multiple choice checkbox form field has been submitted. (including the brackets): [1,0,1]
1=box checked
When the first number in the string = 1 value = pie, when the second number in this string =1 value= cookies, when the third number in this string =1 value = fruit. So the output for this string would be cookies, fruit.
I need to assign values to these numbers in an sql query. Something like:
select answer_data from answers where if the first number in the string = 1, the value is pie; if the 2nd number in the string = 1, the value is cookies;if the third number in the string=1, the value is fruit;
"$[I]" = i, group and select.