Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 3rd, 2008, 06:09 PM
Member
 
Join Date: Jun 2008
Posts: 89
Default how to segregate

Hi,
I have one table and I wanted to segregate the columns by each type. Below is example of the table and result that I wanted. Please tell me how to excute this on a mysql query.

TABLE_FRUITS
name - color
apple - green
mango - yellow
banana- yellow
guava - green

RESULT I WANT
GREEN YELLOW
guava banana
apple mango
Reply
  #2  
Old September 5th, 2008, 11:17 PM
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Age: 22
Posts: 2,760
Default

Hi.

MySQL is meant to store data, not re-arrange it in pretty formations.
That would be the job of the API you use to display your results, like say PHP for a web page.

It probably can be done with a SQL query, but it is usually far easier and more efficient to do that using the front-end API.
Reply
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles