Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: DBI Binding Inconsistancy

by wog (Curate)
on Sep 16, 2001 at 19:00 UTC ( [id://112721]=note: print w/replies, xml ) Need Help??


in reply to DBI Binding Inconsistancy

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').

Replies are listed 'Best First'.
Re: Re: DBI Binding Inconsistancy
by Arguile (Hermit) on Sep 16, 2001 at 19:12 UTC
    *Aguile blushes very ruddily*

    Adding the scalar immediately fixed it. I completely forgot about context in this case, even though I used $->param('id') in list context for the delete template. That'll teach me for not programming Perl for a few months.

    Thanks alot. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://112721]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-23 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found