I have a table like this:
// mytable
+----+--------+-------------------+
| id | word | numbers |
+----+--------+-------------------+
| 1 | hello | 1<br>2<br>3<br> |
| 2 | how | 12<br>15<br> |
| 3 | are | 453<br>1<br> |
| 4 | you | 3<br>33<br>453<br>|
+----+--------+-------------------+
And I want this output:
// mynewtable
+----+--------+---------+
| id | word | numbers |
+----+--------+---------+
| 1 | hello | 1 |
| 2 | hello | 2 |
| 3 | hello | 3 |
| 4 | how | 12 |
| 5 | how | 15 |
| 6 | are | 453 |
| 7 | are | 1 |
| 8 | you | 3 |
| 9 | you | 33 |
| 10 | you | 453 |
+----+--------+---------+
I can do that using PHP. First I have to fetch all rows and implode them by <br>
then insert them again. But now I want to know, is there any better solution? (specially using pure MySQL)
` with a single character then [Can I resolve this with pure mysql? joining on ';' separated values in a column](http://stackoverflow.com/a/33806675/3184785) maybe interesting. You could change the functions to use `
` as the separator. It will give the output you want. – Ryan Vincent Dec 02 '15 at 13:50