Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-06-25 13:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.