Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: DBI, SQL and Dates

by dws (Chancellor)
on Aug 07, 2002 at 08:36 UTC ( [id://188259]=note: print w/replies, xml ) Need Help??


in reply to Re: DBI, SQL and Dates
in thread DBI, SQL and Dates

$dbhstmt->execute( "'$SuStCo_strID'", "'$date'" ); I suggest this, as it's a good idea to have quotes around anything going into SQL, to stop nasty input tricks.

Bad advice, unless you want to end up with extra quote characters around fields in the database. I've only seen people do that by accident.

Better to pass strings to execute() either unquoted, or surrounded by double quotes. The latter is needed if you're trying to "pass" on object that overides stringify, and you want to store the stringified representation.

Log In?
Username:
Password:

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

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

    No recent polls found