Get options from mySQL Query - mulitple

2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 20, 2011   (RSS)

Hello, again.

I have a record which is a list, whose values offered are based on other tables in the CMS.

So, usually use something like:
SELECT num,title
FROM `<?php echo $TABLE_PREFIX ?>study_with_us`
WHERE (education_level = '') AND (parent = '')


However, I want to offer records from two tables, i.e. something like:
SELECT num,title
FROM `<?php echo $TABLE_PREFIX ?>table_one`
WHERE (parent = '')
AND
SELECT num,title
FROM `<?php echo $TABLE_PREFIX ?>table_two`


Putting AND in the middle and reissuing the select query obviously doesn't work, but that's the general idea, so the select box offers:

table_one record 1
table_one record 2
table_two record 1
table_two record 2

Is this at all possible?

Cheers