I have 2 fields. One is a select which gives me a double select. I can get the value both into a table, the first being a single value and the 2nd being a string that is ‘;’ delimited. I need to put them into individual rows. So “A”, “B;C;D” needs to be “A”,B" then “A”,“C”, then “A”,“D”. For the life of me I can’t make this happen. I can get just the double select exploded out and insert it, but not both together. Is there a good way to do this??? I’ve tried all I know.
I think you must create a new field for your table for store each value for second value, so your table will have 3 fields.
then in you event onvalidate success you must get each value for 2 field like as “B;C;D”. and use a bucle for insert each value into same table to new field created.
Like as:
Got it. Easier to split using a mysql stored proc than do it in php. Well, at least I understand it better! Thanks.
Not sure if this can help. You could possible use substring_index function to extract.