Here Problem is make sql query is not check case sensitive latters Here SQL Version;
VERSION(): 8.0.15
Sql Query for login user:
SELECT COUNT(*) as cnt FROM accounts WHERE (number = 'AdMin' OR email = 'AdMin') AND password = '******' AND type IN (1) AND deleted = 0
Database store name='admin'
here how to set case sensitive sql query for mysql 8.0 and stop login when username ='AdMin'
You need to use the BINARY
operator to make your search case sensitive:
SELECT COUNT(*) as cnt
FROM accounts
WHERE (number = BINARY 'AdMin' OR email = BINARY 'AdMin') AND password = '******' AND type IN (1) AND deleted = 0
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.