Page 2 of 2
Re: Use added user field(s) as variables for forms sql state
Posted: Tue Jul 23, 2019 5:04 pm
by nub74
Hi,
it works but how I can set the statement ($t) as form sql data source?
Re: Use added user field(s) as variables for forms sql state
Posted: Tue Jul 23, 2019 6:08 pm
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
Re: Use added user field(s) as variables for forms sql state
Posted: Wed Jul 24, 2019 9:28 am
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.
Re: Use added user field(s) as variables for forms sql state
Posted: Wed Jul 24, 2019 10:20 am
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)
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.