Perl Monk, Perl Meditation | |
PerlMonks |
Re: DBI Binding Inconsistancyby wog (Curate) |
on Sep 16, 2001 at 19:00 UTC ( [id://112721]=note: print w/replies, xml ) | Need Help?? |
What's happening is that the $param method
is returning a null list in this case, not undef.
This null list results in nothing being
passed to bind_param from $q->param('id').
The reason that it's doing this is that it's being
called in list context being in
an argument list, and thus CGI.pm thinks it
needs to return a (possibly empty) list. You should be able to fix
this by explictly specifying scalar context with
something like scalar $q->param('id').
In Section
Seekers of Perl Wisdom
|
|