how to replace STRING in forms in SQL browse with a variable

Questions related to customising nuBuilder Forte with JavaScript or PHP.

how to replace STRING in forms in SQL browse with a variable

Unread postby honza1965 » Thu Apr 29, 2021 9:05 pm

Please nice - I have one FORM and I need to select data depending on the different values of the variable. How to insert a variable from PHP into this BROWSE? ? ? This is the variable nu_user_name. Thanks for the feedback
Attachments
dotaz01.png
dotaz01.png (156.9 KiB) Viewed 236 times
honza1965
 
Posts: 4
Joined: Thu Apr 29, 2021 4:49 am
nuBuilder Version: 4.5

Re: how to replace STRING in forms in SQL browse with a vari

Unread postby kev1n » Thu Apr 29, 2021 9:19 pm

Hi,

The Hash Cookie #USER_ID# contains the User ID.
Add a JOIN to the table zzzzsys_user and place in the WHERE clause a filter on the zzzzsys_user_id.

Example:


Code: Select all
SELECT * FROM your_table
LEFT JOIN zzzzsys_user ON sus_name = your_table_user_name
WHERE (zzzzsys_user_id = '#USER_ID#')
kev1n
nuBuilder Team
 
Posts: 2012
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: jak se string ve formulářích v SQL procházet promě promě

Unread postby honza1965 » Fri Apr 30, 2021 4:27 am

dear Kevin1 - thank you very much for your advice - everything works as I needed. You helped an old IT worker. I first started living as an IT in 1987, but now I have been on a disability pension for 15 years. Sometimes, however, I need to make an application for friends as my hobby, but my knowledge is already small ... You helped me very professionally and colleagues. Hats off not only for your knowledge, but also for your willingness to help an unknown colleague! ! ! Thanks Honza Nachtigal
honza1965
 
Posts: 4
Joined: Thu Apr 29, 2021 4:49 am
nuBuilder Version: 4.5


Return to Custom Code

Who is online

Users browsing this forum: No registered users and 10 guests

cron