I am using DBI with MySQL and am looking for a way to test if a query returned an empty recordset.
You might have better luck by rephrasing the question as "how many users with this name exist?"
Try something like this (untested):
my $sth = $db1->prepare( "SELECT count(*) FROM users WHERE username = ?" ); $sth->execute($Username_POST); my $rs = $sth->fetchall_arrayref(); my $count = $rs->[0]->[0];
In reply to Re: Perl Mysql Null Recordset
by dws
in thread Perl Mysql Null Recordset
by JoeJaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |