Use cross tabulation 
query.
check the link
http://www.databasejournal.com/features/mysql/article.php/3855376/All-About-the-Crosstab-Query.htm

Imran Shafiq Khan

--- On Fri, 16/4/10, ya...@southcot.com <ya...@southcot.com> wrote:

From: ya...@southcot.com <ya...@southcot.com>
Subject: [php_mysql] Combining results
To: php_mysql@yahoogroups.com
Date: Friday, 16 April, 2010, 12:21







 



  


    
      
      
      Take the table fruit:-



FrType  FrName  FrColour

------------ --------- --

PPepo   Gourd   Multi

Pepo    Melon   Yellow

Hesp    Lemon   Yellow

Hesp    Lime    Green

Hesp    Orange  Orange

True    Kiwi    Green

True    Guava   Green



SELECT FrName FROM fruit WHERE FrColour = 'Green';



Gives 3 rows:-



Lime

Kiwi

Guava



Is there any way of combining those result using SQL to give just 1 row:-



Lime,Kiwi,Guava



Charlie





    
     

    
    


 



  






      

[Non-text portions of this message have been removed]

Reply via email to