MySQL split values to multiple rows two table [closed]

  laravel, mysql, php

I have table :
table a:
id | content
1 | a, b, c
2 | b
3 | b, c, d

Table b:
id | name | value
1 | a | 3000
2 | b | 4505
3 | c | 1257
4 | k | 2323

i want output like this :
id | value | content
1 | 3000, 4505, 1257 | a, b, c
2 | 4505 | b
3 | 1257 | c

Source: Ask PHP

LEAVE A COMMENT