I am trying to use the crypt function to verify a user's details in database:
my $sql = $dbh->prepare("SELECT COUNT(id) FROM tblUsers WHERE UPPER(Username)=UPPER(?) AND Password=?");
my $count;
$sql->execute(
$args{login_username},
crypt($args{login_password},$args{login_username})
);
but it returns 0 rows (with the password definitely correct)
the line:
$sql->execute($args{login_username},$args{login_password});
works perfectly.
Any ideas as to what might be going wrong?