Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Mysql module

by Tomte (Priest)
on Mar 12, 2003 at 12:12 UTC ( #242326=note: print w/replies, xml ) Need Help??


in reply to Mysql module

Funny no-one mentioned it so far: You should consider to develop the habit to always use prepared statements, passing in such things as parameters:

[...] my $queryStatementHandler = $dbh->prepare("SELECT field1,field2 FROM m +y_table WHERE LEFT(field3, ?) = ?"); $query->bind_param(1, $value_1); $query->bind_param(2, $var); $query->execute(); [...]

Not only is this (and the shorter forms DBI allows for) usually considered good style, but usually the safest form to talk to a DB.

regards,
tomte


Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2022-01-22 19:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?