Select Box - Advanced mySQL - labels

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 17, 2010   (RSS)

Hey,

Setting up a list field, with advanced mysql statement to concatenate the label of the list field:

So far:

SELECT num, CONCAT_WS(' ',field1,field2,field3) FROM cms_table

This works, BUT...
field1, field2 and field3 are themselves linked list fields, and the actual values are numbers.

So the above will return:

1 3 4

for example

Where I want it to return the label for each field i.e.

label label label

I foresee this needing to look up each label for each field and then do concat those results...

Is this possible, and if so, where should I start with the mysql code?

Cheers