Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Encoding issue from DBI to string

by marto (Cardinal)
on Jan 03, 2013 at 16:55 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1011487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found