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 4013 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.

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]