Get options from mySQL Query

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 11, 2013   (RSS)

By ht1080z - November 11, 2013

Hi Tim,

You need to create a 'list' type field in your "pages" section with List option "Get options from MYSQL query (advanced) and paste something like:

SELECT num, title
  FROM `<?php echo $TABLE_PREFIX ?>panels`
  WHERE gallery = 1
  ORDER BY title ASC

You can use "Display as" options: pulldown or pulldown (multi value) only.

In this query i also sort the titles alphabetically.

I hope this helps,
Karls

By Toledoh - November 11, 2013

Brilliant!  Thanks for the post Karls!

Cheers,

Tim (toledoh.com.au)