1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Split field by Comma

Discussion in 'MySQL' started by Gnaniyar, Jan 27, 2009.

  1. Gnaniyar

    Gnaniyar New Member

    Joined:
    Jan 27, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi all,

    i want to split field by comma. For example,

    primarySkills

    20553, 32115, 78546

    i have this field as id. it may contain 4 or 5 or above that. i want to retrive these in different columns by splitting comma.

    i want ouput like this: ( if 3 values = 3 column or 4 values = 4 column)

    primarySkills primarySkills primarySkills

    20553 32115 78546

    Thanks in advance.

    - Gnaniyar Zubair
     
  2. Bhullarz

    Bhullarz New Member

    Joined:
    Nov 15, 2006
    Messages:
    253
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    System Manager
    Home Page:
    I think PHP's explode function can help you in this.
     

Share This Page