Dovresti eseguire un confronto binario
SELECT ..... AND password= binary('pwd_inserita')
Sarebbe meglio però che non salvassi le password in chiaro.
codice:
create table utenti(
id int not null auto_increment,
nome varchar(50),
pwd char(32),
primary key (id)
) engine = myisam
insert into utenti (nome,pwd) values ('utente1',md5('prova'));
insert into utenti (nome,pwd) values ('utente2',md5('Prova'));
select * from utenti where nome = binary('utente1') and pwd = md5('Prova')
Vedrai che la select non identificherà alcun utente perchè l'md5 di Prova è diverso da quello di prova.