I have a verity collection where I want 1 of the custom variables to be a Comma 
Separated List.

So after the search I can show some images based on the search.

How can I (in 1 SQL statement if possible) put this into the cfindex tag.

I.e.

Result1, Title1, Body1, URL1, (List:3,6)
Result2, Title2, Body2, URL2, (List:2,4,6)

I was trying to do this on a FK related table:
Adverts and AdvertOptions where AdvertID and OptionID are related in the second table

SELECT (SELECT OptionID FROM AdvertOptions WHERE AdvertOptions.AdvertID = 
Options.AdvertID) AS OptionList, Adverts.*
FROM Adverts 
WHERE Adverts.AdvertActive = 1

This won't work as the inner select fails when more than 1 option is found.

Thanks

Allan

Reply via email to