Select fields from multiple sections

5 posts by 3 authors in: Forums > CMS Builder
Last Post: March 30, 2014   (RSS)

By Chris - March 24, 2014

Hi nmsinc,

I'm not sure what you mean. Can you provide more details and perhaps some examples of your tables and fields?

All the best,
Chris

By nmsinc - March 24, 2014

HI Chris,

I need to include the value of field from another section as option choice as well as being able to SELECT values as options from another field

Section = Membership and Field = timeshare

Section = Claims Field (from pull down menu) = types

Thanks - nmsinc

nmsinc

By Daryl - March 28, 2014 - edited: March 28, 2014

Hi nmsinc,

You're trying to create a select field wherein the list options will come from two different sections, is that correct?

In that case, you can use "UNION" operator, for example:

SELECT timeshare FROM `<?php echo $TABLE_PREFIX ?>membership`
UNION
SELECT types FROM `<?php echo $TABLE_PREFIX ?>claims`

These will give you a list options of values from "timeshare" followed by values from "types".

Hope this helps you to get started on creating your list options.

Cheers,

Daryl Maximo
PHP Programmer - interactivetools.com

By nmsinc - March 30, 2014

Thanks Daryl - I will give this a try!

nmsinc