Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

update linked tables

Locked
Tinka
Posts: 73
Joined: Mon Feb 24, 2014 2:58 pm

update linked tables

Unread post by Tinka »

Hi

I am new to NuBuilder and would like to use it to build a small webapp, having very basic experience with mySQL and php.
I have a very general question:

Now, what would be the smartest way to build forms that update data or create several new records in different db tables that are linked by foreign keys at once, in one form?
I can retrieve data for the browse screens by inner join statements, but just creating a record and link it to other existing/new records seems hard to do. Is the subform approach the way to go? I assume I would need some after save code to do the db update.

I watched your videos for NuBuilder Pro (this robot voice and guitar song is driving me nuts btw, sorry for your good intentions but I preferred the real Australian guys :)) and I am missing some more in depth explanation on how to use subforms and custom code to achieve this.

Do you have the customers/invoice/products example as a sample db? How much extra php/JS/Sql is needed?

BR, Tinka from Denmark
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: update linked tables

Unread post by admin »

Tinka,

A subform is prefect for editing child records (eg. invoice items on an invoice).

Have you tried to create one yet?

Here is the db used for the video tutorials..
site_b.zip
(161.97 KiB) Downloaded 458 times
Steven
Tinka
Posts: 73
Joined: Mon Feb 24, 2014 2:58 pm

Re: update linked tables

Unread post by Tinka »

Thank you for the sample db, I will try combining subforms and lookups and see how far it takes me as an inexperienced developer.
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: update linked tables

Unread post by admin »

.
Locked