Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Devel::Declare type syntactic sugar for DBI select bind_col param

by Anonymous Monk
on Sep 30, 2012 at 11:44 UTC ( #996497=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    SELECT $dbh,
         ":name, :email from ... where DIAPER=?",
    ...
    {
        print "$name < $email >\n";
    }
    
  2. or download this
    SELECT $dbh,
         " :name, :email
    ...
    {
        print "$name < $email >\n";
    }
    
  3. or download this
    SELECT $dbh,
         ":name, :email from ... where DIAPER=?",
         'soft and absorbant'   {
        print "$name < $email >\n";
    }
    
  4. or download this
    SELECT $dbh,
         " :name, :email
    ...
         'soft and absorbant'   {
        print "$name < $email >\n";
    }
    
  5. or download this
    $dbh->SELECT
         ":name, :email from ... where DIAPER=?",
    ...
    {
        print "$name < $email >\n";
    }
    
  6. or download this
    $dbh->SELECT
         " :name, :email
    ...
    {
        print "$name < $email >\n";
    }
    
  7. or download this
    $dbh->SELECT(
         ":name, :email from ... where DIAPER=?",
    ...
    sub {
        print "$name < $email >\n";
    });
    
  8. or download this
    $dbh->SELECT(
         " :name, :email
    ...
    sub {
        print "$name < $email >\n";
    } );
    
  9. or download this
    
    for my $quality ( 'soft', 'absorbant' ){
    ...
            print "$rec{name} < $rec{email} >\n";
        }
    }
    
  10. or download this
    for my $quality ( 'soft', 'absorbant' ){
        SELECT ":{name}, :{email} from ... where DIAPER=?", $quality {
            print "$rec{name} < $rec{email} >\n";
        }
    }
    
  11. or download this
    {
        my %rec = (
    ...
        }
    }
    # line 7 foo.pl
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://996497]
Approved by moritz
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2015-07-08 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls