Get options from MySQL query

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 15, 2008   (RSS)

Hi I am wanting display more than one item from a specific table using the "list" option, I have selected the "Get options from MySQL query" and have enter this into the form filed "SELECT summary, title, date FROM cms_news". The results are only bringing back the first entry "summary", what else do I need to change to show all resluts "summary, title and date"
Thanks
Simon

Re: [sjenko] Get options from MySQL query

By Dave - September 15, 2008

Hi Simon, welcome to the CMS Builder forums! :)

Only the first two columns returned are used. The first column is used as the list option value and the select as the label.

How do you want the list field to look (what values displayed) and what should it store in the database when selected?

Let me know and I'll try and help!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Get options from MySQL query

Cheers Dave I have solved the issue from a previous thread using:

SELECT CONCAT_WS(" ", related_title, summary), CONCAT_WS(" ", related_title, summary) FROM cms_news

to pull different information from the database.

Regards
Simon