Help for this page

Select Code to Download


  1. or download this
    my $sql1 = <<SQL_END;
    insert into t ( tstamp,            message )
           values ( current_timestamp, ?       )
    SQL_END
    
  2. or download this
      $db->do( 'insert into t values ( current_timestamp, '
        . $db->quote( $var1 )
        . ' )'
      ) or die "SQL go boom " . $db->errstr;
    
  3. or download this
    my $sth = $db->prepare( $sql1 ) or die(...);
    ...
    $sth->execute( $var );