I believe this should be relatively simple but I can't seem to figure out the logic to it.
I'll start with what I'm looking for. I wanted to be able to pass in values (such as e-mail addresses) through a SELECT query and have it output whether those rows exist or not. It would be something like this:
# PASS Values test@test.com and example@example.com in.
# For these purposes let's pretend that test@test.com exists
# and example@example.com does not.
+----------------------+--------+
| E-mail | Exists |
+----------------------+--------+
| test@test.com | 1 |
| example@example.com | 0 |
+----------------------+--------+
There is the answer here for a single result: MySQL EXISTS return 1 or 0 but I would like to expand on that and am having issues figuring it out.
Any help would be great. Thanks!