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";
    }