because confirm is an alias
.
You can't use an alias
in the where
clause in the same level of query.
You have to do
where xxx
and MD5(CONCAT(users_pass, users_email)) = '39a5eccb97f63a2bb649ddd95c5a3ba7'
Or, as stated by Vatev, you can use an alias in an HAVING
clause. But use an HAVING
clause may have an impact on performance.
Cause where filters your query (trying to use indexes, for example), and the HAVING clause is filtering on these filtered datas.
where xxx
HAVING confirm = '39a5eccb97f63a2bb649ddd95c5a3ba7'