so here's what I accomplished right now:
- given email1 and email2,
- get all emails that are not equal to email1
- create a list of them
- check if email2 exists in the list
- if it does return false, if it does not return true
Is there a way to accomplish this via a query instead of creating a list and searching if email2 exists in it? (because I've implemented the above pseudo in PHP and I had a query object and an array...ugly approach)
given a user table with the following schema id INT(11) PRIMARY KEY email VARCHAR(100)