How to split comma separated single column into multiple columns in php mysql -


i have table below

id  name   email  1        email1@gmail.com  2    b     email1@gmail.com  3    c     email1@gmail.com  4    d     email2@gmail.com  5    e     email3@gmail.com  6    f     email3@gmail.com 

i want output below:

id    name1  name2   name3  email  1          b       c      email1@gmail.com 

while trying following query:

select group_concat(name), email table 1 group email

it having output like:

group_concat(name)  email  a,b,c    email1@gmail.com 

how expected output using php mysql query.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -