Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Cookie login (pseudocode)

by Spidy (Chaplain)
on Feb 20, 2008 at 15:59 UTC ( #669031=note: print w/replies, xml ) Need Help??


in reply to Re^3: Cookie login (pseudocode)
in thread Cookie login (pseudocode)

Akoya, the DBI module will sanitize the parameters you pass in to placeholders in a prepared statement:
my $sth = $dbh->prepare("SELECT * FROM foo WHERE bar = ?"); $sth->execute("my 'scary variable here';");
Whereas if you just did it using $dbh->do():
$dbh->do("SELECT * FROM foo WHERE bar = " . "my scary 'variable here'; +");
You would have a problem, because the ' and ; characters would not have been escaped - and would therefore do Bad Things™ to your database.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://669031]
help
Chatterbox?
[stevieb]: I have learned that my daughter has significant brain injury, so that's affecting my decisions. Don't know who to reach out to. I just want to vent. I am honestly lost. It's something I can't code around.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2017-02-25 03:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (365 votes). Check out past polls.