Here is what I came up with:
SELECT
IF(mem_username='test@example.com','true','Error: Bad Username') AS mem_username,
IF(mem_password ='abc123','true','Error: Bad Password') AS mem_password'
FROM MEMBERS
WHERE mem_username='test@example.com' AND mem_password='abc123'
Thus, I can detect error messages in the code and then display them if necessary.
.. , , . , , . , , .