Help for this page

Select Code to Download


  1. or download this
    my $stmt = 'INSERT INTO some_table (' . join(',', keys %data_to_insert
    +) . ') VALUES (' . join(',', ('?') x keys %data_to_insert) . ')';
    $dbh->do( $stmt, undef, values %data_to_insert);
    
  2. or download this
    my $stmt = 'SELECT * FROM some_table WHERE entry_id = ?';
    my $row = $dbh->selectrow_hashref($stmt, undef, $entry_id);
    
    my $full_name = $row->{first_name'} . ' ' . $row->{last_name'};