Help for this page

Select Code to Download


  1. or download this
    my $sth = $dbh->prepare(q{
      INSERT
        INTO table
             (col1, col2, col3)
      VALUES (?, ?, ?)
    });
    
  2. or download this
    my $tuple = $dbh->selectrow_array(q{
        SELECT col1
          FROM table1
    ...
      {},
      $someval,
    );
    
  3. or download this
    my $sth_get_id = $dbh->prepare(q{
      SELECT id
        FROM contact
    ...
    
      print "$email -> $id\n";
    }
    
  4. or download this
    my $emails = $dbh->selectcol_arrayref(q{
        SELECT email
          FROM contact
    ...
    );
    
    foreach my $email (@$emails) { ...