Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By avanzyl
#824524
I created a process to simply record my queries to a processmaker table. In the process I have one dynaform with two questions. The first question is a dropdown box to query all the user UID's. I would then select a user UID and the next question queries the user email based on the UID selected. The SQL query for question 1 is given below:

SELECT USR_UID FROM USERS ORDER BY USR_UID DESC

The query for the second question is given below:

SELECT USR_UID, USR_EMAIL FROM USERS WHERE USR_UID = @@user_uid ORDER BY USR_EMAIL ASC


My Problem is that the first query doesnt return any results. Any assistance would be great.
Attachments
Test.PNG
Test.PNG (10.01 KiB) Viewed 4018 times
By danielwalters
#824529
Hey.

I have some feeling that you always have to select both the ID, and then the field you want, so
Code: Select all
SELECT USR_UID FROM USERS ORDER BY USR_UID DESC
becomes
Code: Select all
SELECT USR_UID, USR_UID FROM USERS ORDER BY USR_UID DESC
if you want a dropdown of UID's

Give this a go.

Cheers,
Daniel
User avatar
By avanzyl
#824530
danielwalters wrote: Tue May 21, 2019 5:19 am Hey.

I have some feeling that you always have to select both the ID, and then the field you want, so
Code: Select all
SELECT USR_UID FROM USERS ORDER BY USR_UID DESC
becomes
Code: Select all
SELECT USR_UID, USR_UID FROM USERS ORDER BY USR_UID DESC
if you want a dropdown of UID's

Give this a go.

Cheers,
Daniel
Thanks Daniel for the help.
Zappify Consumer Report

Zappify 2.0 Review- Picture this: you're sitting o[…]

Zappify Consumer Report

Zappify 2.0 Review- Picture this: you're sitting o[…]

🚨 Verpassen Sie nicht die neueste Handelsplattform[…]

Thanks. Very useful. https://www.solarpanelinstal[…]