Help for this page

Select Code to Download


  1. or download this
      $SQL = "INSERT INTO EMPLOYEE (
                  EMPLOYEE_NUMBER, FIRST_NAME, LAST_NAME, INFORMATION_DATE
    +)
    ...
    +;
      $sth = $dbh->prepare($SQL);
      $sth->execute( $employee_number, $first_name, $last_name );
    
  2. or download this
      $SQL = "INSERT INTO EMPLOYEE (
                  EMPLOYEE_NUMBER, FIRST_NAME, LAST_NAME, INFORMATION_DATE
    +)
    ...
    +;
      $sth = $dbh->prepare($SQL) or die $DBI::errstr;
      $sth->execute( $employee_number, $first_name, $last_name ) or die $D
    +BI::errstr;
    
  3. or download this
      if ( !$sth->execute( $employee_number, $first_name, $last_name ) ) {
        print "Could not insert into database: ", $DBI::errstr, "\n";
        return;
      }