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

Questions related to using nuBuilder Forte.

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

Postby nub74 » Wed Jul 24, 2019 12:34 am

Hi,
it works but how I can set the statement ($t) as form sql data source?
nub74
 
Posts: 20
Joined: Sun Jul 21, 2019 7:39 pm
Location: Italy

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

Postby Janusz » Wed Jul 24, 2019 1:38 am

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:

viewtopic.php?f=20&t=9953#p19320
Janusz
 
Posts: 276
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

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

Postby nub74 » Wed Jul 24, 2019 4:58 pm

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.
nub74
 
Posts: 20
Joined: Sun Jul 21, 2019 7:39 pm
Location: Italy

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

Postby Janusz » Wed Jul 24, 2019 5:50 pm

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.
Janusz
 
Posts: 276
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Previous

Return to General