Do you know where your variables are? | |
PerlMonks |
Re: Testing to INSERT or UPDATE MySQL recordby periapt (Hermit) |
on Jan 18, 2005 at 21:03 UTC ( [id://423181]=note: print w/replies, xml ) | Need Help?? |
You could also try a $sql = qq|SELECT COUNT(*) FROM bankend|; before the update/insert decision block. The program could then take the appropriate action depending on whether the result was 0, 1, or 2+ using a simple if-elsif-else ladder (for error checking). PJ use strict; use warnings; use diagnostics;
In Section
Seekers of Perl Wisdom
|
|