![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
What is the correct way to do this? I want to select a subset email addresses from a table and present them as a comma delimited single result. ie.e the result will be : 'fred (AT) bloogs (DOT) com,sue (AT) mouse (DOT) com,charley (AT) watts (DOT) com' Is this concat() and a 'group by' thing? |
#3
| |||
| |||
|
|
What is the correct way to do this? I want to select a subset email addresses from a table and present them as a comma delimited single result. ie.e the result will be : 'fred (AT) bloogs (DOT) com,sue (AT) mouse (DOT) com,charley (AT) watts (DOT) com' Is this concat() and a 'group by' thing? |
#4
| |||
| |||
|
|
The Natural Philosopher wrote: What is the correct way to do this? I want to select a subset email addresses from a table and present them as a comma delimited single result. ie.e the result will be : 'fred (AT) bloogs (DOT) com,sue (AT) mouse (DOT) com,charley (AT) watts (DOT) com' Is this concat() and a 'group by' thing? A bit of googling led me to this: This worked, but seems ugly.. select 1 as g, group_concat(email separator ',') as them from people where status>1 group by g; is there no other way than creating a constant dummy field to group all results in a select? It works well enough. Just seems a bit clumsy.. |
![]() |
| Thread Tools | |
| Display Modes | |
| |