Help with SQL Query
4 posts by 2 authors in: Forums > CMS Builder
Last Post: November 2, 2016 (RSS)
By Toledoh - October 27, 2016
Hi Guys,
I'm trying to create a query for list options, and the following works as I want:
SELECT num, CONCAT(club, ' ', day, ' :', level) eventname
FROM `<?php echo $TABLE_PREFIX ?>events`
ORDER BY eventname ASC
However, the fields club, day and level are all list options, so they display as values and I want to display as labels. I thought the following would work, but it doesn't.
SELECT num, CONCAT(club:label, ' ', day:label, ' :', level:label) eventname
FROM `<?php echo $TABLE_PREFIX ?>events`
ORDER BY eventname ASC
Any ideas?
Tim (toledoh.com.au)
By ross - November 1, 2016
Hi Tim
Thanks for posting.
To get the labels for those fields, we'll be getting into some advanced SQL (ie: table joins).
Could you email me through consulting@interactivetools.com with FTP details and a CMS Builder login for your site?
I'd like to review your setup and we can continue the discussion via email from there.
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/
By Toledoh - November 1, 2016
Thanks Ross.
I've got greg on other parts for this project, so I'll continue there.
Tim (toledoh.com.au)
By ross - November 2, 2016
Sounds good. Thanks, Tim.
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/