JoeJaz has asked for the wisdom of the Perl Monks concerning the following question:
Assume that I have the database connection set up correctly. I have tried a statement such as:$rs1 = $db1->prepare("SELECT * FROM users WHERE username = '" . $Usern +ame_POST . "';");
I have also tried placing the $rs1->execute; statement after the if statement, but that changed nothing. The if statement always evaluates to true. Will anyone take pitty on my with this question? I would really appreciate any advice. Thanks for reading my problem. Joe$rs1->execute; if($rs1 != 'NULL') { report_error("username_exists"); } else { report_error("username does not exist"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Mysql Null Recordset
by dws (Chancellor) on Nov 16, 2004 at 21:51 UTC | |
by JoeJaz (Monk) on Nov 16, 2004 at 22:08 UTC | |
by StrebenMönch (Beadle) on Nov 17, 2004 at 14:39 UTC | |
|
Re: Perl Mysql Null Recordset
by ikegami (Patriarch) on Nov 16, 2004 at 21:58 UTC | |
by JoeJaz (Monk) on Nov 16, 2004 at 22:06 UTC | |
|
Re: Perl Mysql Null Recordset
by jZed (Prior) on Nov 16, 2004 at 22:10 UTC | |
by JoeJaz (Monk) on Nov 16, 2004 at 22:18 UTC | |
|
Re: Perl Mysql Null Recordset
by TrekNoid (Pilgrim) on Nov 16, 2004 at 21:49 UTC | |
by JoeJaz (Monk) on Nov 16, 2004 at 21:57 UTC | |
|
Re: Perl Mysql Null Recordset
by ChrisR (Hermit) on Nov 17, 2004 at 02:33 UTC | |
|
Re: Perl Mysql Null Recordset
by radiantmatrix (Parson) on Nov 17, 2004 at 21:45 UTC | |
by jZed (Prior) on Nov 17, 2004 at 22:08 UTC |