Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Need help writing a script that interacts with a MySQL DB!

by tinita (Parson)
on Sep 30, 2012 at 10:54 UTC ( #996495=note: print w/ replies, xml ) Need Help??


in reply to Need help writing a script that interacts with a MySQL DB!

my $query = "SELECT * FROM People where Name = '$console'";
Please learn to use placeholders as early as possible and get used to it. they make your database statements more secure and the code is in most cases cleaner to read. You don't need to care about quoting the value.
see also http://bobby-tables.com/
my $query = "SELECT * FROM People where Name = ?"; # later: $query1->execute($console);


Comment on Re: Need help writing a script that interacts with a MySQL DB!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-12-21 21:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (108 votes), past polls