Skip to main content

Conditional value if ID exists on another table

  • October 31, 2020
  • 0 replies
  • 6 views

  • New Participant
  • 3 replies

Summary:
I’m working on a basic sign up process.

I’m sending a POST request with the user’s UID to a table called “Sessions” to create a new record. I wish to have a certain value returned if that UID exists on another table called “Users”, and a different value returned if it doesn’t exist.

ex: So if I create a new record on “Sessions”, and the UID exists on table “Users”, on column RESULT I will get “User already exists on Users table”, and if it doesn’t exist RESULT will return “This is a new user”.

I’m at a loss here at this point.
Any ideas?

0 replies

Be the first to reply!