Quoting FlashWebHost.com: > password_query = SELECT username as user, password FROM mailbox WHERE > username = '%u' AND active=1 If understood you correctly, this should do what you want: SELECT LOWER(username) AS user, password...