Welcome to the nuBuilder Forums!

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

Use added user field(s) as variables for forms sql statement

Questions related to using nuBuilder Forte.
nub74
Posts: 20
Joined: Sun Jul 21, 2019 12:09 pm
Location: Italy

Re: Use added user field(s) as variables for forms sql state

Unread post by nub74 »

Hi,
it works but how I can set the statement ($t) as form sql data source?
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Use added user field(s) as variables for forms sql state

Unread post by Janusz »

normally in the same php code you can read data from other tables as in the example just before and set form sql following this post:

https://forums.nubuilder.cloud/viewtopic. ... 953#p19320
If you like nuBuilder, please leave a review on SourceForge
nub74
Posts: 20
Joined: Sun Jul 21, 2019 12:09 pm
Location: Italy

Re: Use added user field(s) as variables for forms sql state

Unread post by nub74 »

Hi Janusz,
now everything is working properly.
Thank you very much for your help.
One last thing: is there a way to import data from external databases already populated
so that nuBuilder generates its own keys?
Thanks again.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Use added user field(s) as variables for forms sql state

Unread post by Janusz »

Hi,
so that nuBuilder generates its own keys?
I am not sure if I properly understood you question but in php you can generate the ID with: (and probably attache it to imported records)

Code: Select all

$string = nuID()
for example in my case for all my tables I use INT with auto increment defined on the DB level (as mytable_id) - so no need to set anything more.
If you like nuBuilder, please leave a review on SourceForge
Post Reply