Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: DBI, place holders and CGI forms

by Anonymous Monk
on Jun 02, 2011 at 15:53 UTC ( [id://907834]=note: print w/replies, xml ) Need Help??


in reply to Re: DBI, place holders and CGI forms
in thread DBI, place holders and CGI forms

My db is 10G oracle. I don't understand your bind to null answer. Do you mean bind the variable for example $foo = $cgi->param('foo') || undef; and call execute with $foo, or something else?

Replies are listed 'Best First'.
Re^3: DBI, place holders and CGI forms
by kennethk (Abbot) on Jun 02, 2011 at 15:57 UTC
    Something functionally equivalent, yes. DBD::Oracle will map undef to an Oracle null. I would probably build a hash with expected field/value pairs (protection against an untrusted client), and pass that into my query routine. Any unspecified parameter would therefore be automatically mapped to undef.

      but beware you cannot do "where mycol = ?" and then pass a value of undef (mapping to NULL) and expect it to work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-19 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found