Let's say I have a SQL statement like this that checks a user login:
SELECT * FROM users
WHERE username='[email protected]', password='abc123', expire_date>=NOW();
Is there a way in SQL to determine specifically which WHERE conditions fail, without having to separate each condition into its own query and test individually?
In this specific example it would allow the developer to tell users exactly the reason why their attempt to login failed.
For my purposes I'm using PHP/MySQL.