Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Answer: Why does my query work on the command line, but fail in my browser?

( #21546=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > Why does my query work on the command line, but fail in my browser? contributed by CMonster

Whoopsie! Be wary of quoting NULLs. The program listing has $dbh->quote("NULL"); but that gives 'NULL', or the string NULL, rather than the empty value NULL. To get the latter, use $dbh->quote(undef); ...which works just fine if quoting a variable; you get a quoted string when it contains a value, and NULL when it's undef.

  • Comment on Answer: Why does my query work on the command line, but fail in my browser?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2016-06-27 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (337 votes). Check out past polls.