Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by moritz (Cardinal)
on Sep 30, 2012 at 14:45 UTC ( #996508=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $dbh->SELECT(':$name, :$email, :$duration(from - to) FROM table WHERE 
    +duration > $min_duration' {
        say "$name <$email> has spent $duration days here";
    }
    
  2. or download this
    $dbh->prepare('SELECT name, email, from - to AS duration FROM table WH
    +ERE duration > ?');
    $dbh->bind_columns(\my ($name, $email, $duration);
    ...
    while ($sth->fetch) {
        say "$name <$email> has spent $duration days here";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2014-07-26 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (177 votes), past polls