Gossamer Forum
Home : Products : DBMan SQL : Discussion :

One Question - One little problem!

Quote Reply
One Question - One little problem!
Hi All...

Question...is the "$sth->finish" statement a disconnect command from the Mysql database?

Problem...User ID identification....the following code will return user id "Robert" and "robert" as equal
even though they are obviously quite different...can some explain why this is and how to fix it?.. thanks Rob

my $userid_q = $DBH->quote($in{'userid'});
$query = qq!
SELECT userid, password
FROM $db_table
WHERE userid = $userid_q
!;
my $sth = $DBH->prepare ($query) or &cgierr("Unable to query database. Reason: $DBI::errstr. Query: $query");
$sth->execute or &cgierr("Unable to query database. Reason: $DBI::errstr. Query: $query");
($userid,$passwordl) = $sth->fetchrow_array;

Quote Reply
Re: One Question - One little problem! In reply to
add lc before $in{'userid'}.

Regards,

Eliot Lee