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

Re: Avoid SQL injection

by Corion (Patriarch)
on Jan 20, 2023 at 11:49 UTC ( #11149722=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub sqlSingleRow( $sql, @placeholders ) {
        my $sth = $dbh->prepare( $sql );
    ...
        $c->finish();
        return @r;
    }
    
  2. or download this
        my $sql_cat = <<'SQL';
            select ref_categorie
    ...
    SQL
    
        my ($cat) = sqlSingleRow($sql_cat, $category, $lang );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2023-12-11 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?