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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -