Conditional value if ID exists on another table

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?

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.