Forum Moderators: coopster
I have a couple thousand rows of data like this:
Book_num Title Price Category Abstract
b158 PHP 5 101 PHP is cool
b158 PHP 5 203 PHP is cool
b158 PHP 5 309 PHP is cool
c201 C+ 10 102 Learn C+
c201 C+ 10 212 Learn C+
C201 C+ 10 366 Learn C+
With the suggestion of some experts here, I was able to merge the different Category data into one column and just have one row of each Book_num using Mysql's GROUP_CONCAT.
Book_num Title Price Category Abstract
b158 PHP 5 101,203,309 PHP is cool
c201 C+ 10 102,212,366 Learn C+
This worked fine. But now, I need to do something like this and I am not sure how to start it.
Book_num Title Price Category1 Category2 Category 3 Abstract
b158 PHP 5 101 203 309 PHP is cool
c201 C+ 10 102 212 366 Learn C+
So instead of merging the catagory into one column, I want one each of them to have its own column, category1, category2, category3.
Sorry the alignment looks awfule on screen.