Re: Concatenate a char field?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message <09D3F0C5CE9DD84D81AA6B959107B17004FC1524C9@xxxxxxxxxxxxxxxxx
edu.pk>, moahmed-ho@xxxxxxxxxxxxxxxxxx writes
>
>Dear All,
>
>
>In MYSQL , can we sum(concatenate) a char field ?
>
>e.g:
>
>xField
>-------------
>ABC
>EFG
>XYZ
>
>
>Gather data into one .
>
>As -->  ABC, EFG, XYZ
>
>
>Regards,
>Mobeen.

The previous poster suggested explode, which splits things up, and is
not relevant here.

The answer to your question is no, you cannot do what you want to do in
one SQL command.

Basically you have to loop through your result set, and with PHP, do
$mystring.= $fielddata

-- 
Pete Clark

Got any spare time? Anything you need? Barter in Spain
Join for free at http://BarterWithBart.com

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux