/[libdata]/branches/pear-db/admin/include/insert.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/pear-db/admin/include/insert.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 56 by dpavlin, Sat Mar 6 02:44:16 2004 UTC revision 57 by dpavlin, Sat Mar 6 03:09:46 2004 UTC
# Line 69  function insertCoursesub($con, $campus_i Line 69  function insertCoursesub($con, $campus_i
69          // Add only if this coursesub doesn't already exist, and something was supplied          // Add only if this coursesub doesn't already exist, and something was supplied
70          if ($err_code == 0) {          if ($err_code == 0) {
71    
                 // Clean up strings  
   
72                  // Set up SQL                  // Set up SQL
73                  $sql = "INSERT INTO coursesub (coursesub, coursesub_descr, cip_code, campus_id) VALUES ( ? ,  ? ,  ? ,  ? )";                  $sql = "INSERT INTO coursesub (coursesub, coursesub_descr, cip_code, campus_id) VALUES ( ? , ? , ? , ? )";
74                    
75                  // Write the new row to the database                  // Write the new row to the database
76                  if (!xx_prepare_execute($sql, $coursesub, $coursesub_descr, $cip_code, $campus_id)){                  if (!xx_prepare_execute($sql, $coursesub, $coursesub_descr, $cip_code, $campus_id)){
# Line 146  function insertFaculty($con, $faculty_em Line 144  function insertFaculty($con, $faculty_em
144                          sql_err($con);                          sql_err($con);
145                          xx_query ("UNLOCK TABLES", $con);                          xx_query ("UNLOCK TABLES", $con);
146                          bailout();                          bailout();
147          }                  }
148                  else {                  else {
149                          printf("Added <b>%s</b> to the faculty table.<BR>\n", $faculty_name_display);                          printf("Added <b>%s</b> to the faculty table.<BR>\n", $faculty_name_display);
150                          xx_query("UNLOCK TABLES", $con);                          xx_query("UNLOCK TABLES", $con);
# Line 210  function insertFeature($con, $feature, $ Line 208  function insertFeature($con, $feature, $
208                          sql_err($con);                          sql_err($con);
209                          xx_query ("UNLOCK TABLES", $con);                          xx_query ("UNLOCK TABLES", $con);
210                          bailout();                          bailout();
211          }                  }
212                  else {                  else {
213                          printf("Added Feature <b>%s</b>.<BR>", $feature_display);                          printf("Added Feature <b>%s</b>.<BR>", $feature_display);
214                          xx_query("UNLOCK TABLES", $con);                          xx_query("UNLOCK TABLES", $con);
# Line 357  function insertLibunit($con, $head_staff Line 355  function insertLibunit($con, $head_staff
355                          sql_err($con);                          sql_err($con);
356                          xx_query ("UNLOCK TABLES", $con);                          xx_query ("UNLOCK TABLES", $con);
357                          bailout();                          bailout();
358          }                  }
359                  else {                  else {
360                          // $libunit_id = xx_insert_id($con)                          // $libunit_id = xx_insert_id($con)
361                          $insert_res = xx_prepare_execute("select 1 as id from libunit where libunit = ? and libunit_abbrev = ? and head_staff_id = ?", $libunit, $libunit_abbrev, $head_staff_id);                          $insert_res = xx_prepare_execute("select 1 as id from libunit where libunit = ? and libunit_abbrev = ? and head_staff_id = ?", $libunit, $libunit_abbrev, $head_staff_id);
# Line 596  function insertSingleField($con, $displa Line 594  function insertSingleField($con, $displa
594                  // Clean up strings                  // Clean up strings
595    
596                  // Build the SQL                  // Build the SQL
597                  $sql = "INSERT INTO  ?  ( ? ) VALUES ( ? )";                  $sql = "INSERT INTO ! ( ! ) VALUES ( ? )";
598    
599                  // Debugging                  // Debugging
600                  // printf("sql was: %s<br>", $sql);                  // printf("sql was: %s<br>", $sql);

Legend:
Removed from v.56  
changed lines
  Added in v.57

  ViewVC Help
Powered by ViewVC 1.1.26