dws's solution works great if you only need to check if a user exists or not (although I'd use fetch() and $rs->[0] instead of fetchall_arrayref() and $rs->[0]->[0]). If you want to check if the user exists or not, and do something with the record if he does, try the following:
$rs1 = $db1->prepare("SELECT ..."); $rs1->execute(...); unless ($row = $rs1->fetch())) { die("User does not exist\n"); } ... check supplied password against the one in $row ...
In reply to Re: Perl Mysql Null Recordset
by ikegami
in thread Perl Mysql Null Recordset
by JoeJaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |