Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Encoding issue from DBI to string

by marto (Chancellor)
on Jan 03, 2013 at 16:55 UTC ( #1011487=note: print w/ replies, xml ) Need Help??


in reply to Encoding issue from DBI to string

my $RowSet = $dbh->selectall_arrayref("SELECT * FROM CollectionDB.ISIS + WHERE SourceID = '$PassedSource' ORDER BY ObjectKey DESC");

Danger Will Robinson! Exploits of a mom, discussion: http://bobby-tables.com/perl.html, reference SQL Injection.


Comment on Re: Encoding issue from DBI to string
Download Code
Re^2: Encoding issue from DBI to string
by space_monk (Chaplain) on Jan 03, 2013 at 17:31 UTC

    To expand on what marto said, learn how to create SQL with bound variables

    my $rowSet = $dbh->selectall_arrayref("SELECT * FROM CollectionDB.ISIS + WHERE SourceID = ? ORDER BY ObjectKey DESC", {}, $PassedSource);

    A Monk aims to give answers to those who have none, and to learn from those who know more.
      Thanks for the heads up. Not well versed in MySQL, nor Perl for that matter. Just sort of had all of this dumped on my plate and learning as I'm going.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-09-16 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls