Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Display data on a form from multiple tables

alextouch
Posts: 38
Joined: Tue Jun 05, 2012 2:40 pm
Location: Bologna, Italy
Contact:

Re: Display data on a form from multiple tables

Unread post by alextouch »

I'll try. Thank you for your suggestion!

Alex
Max

your suggestions works well but I had to discard the use of #browseTable#.
If I insert #browseTable# as the source table name for the form (in the Table field of the form), nuBuilder doesn't read the value of #browseTable# hash variable, but the name #browseTable# itself! And this generates a query like this:

Code: Select all

SELECT '#browseTable#'.* FROM '#browseTable#'
So I tried a code like this:

Code: Select all

nuRunQuery("DROP TABLE IF EXISTS temp_table");
nuRunQuery("CREATE TABLE temp_table SELECT address as adr FROM employees UNION SELECT address as adr FROM customers");
and it works.

Thank you
Alex
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Display data on a form from multiple tables

Unread post by admin »

.
Locked