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 libunit_id from libunit where libunit = ? and libunit_abbrev = ? and head_staff_id = ?", $libunit, $libunit_abbrev, $head_staff_id); |
362 |
list($libunit_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
list($libunit_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
363 |
|
print "### $libunit_id "; |
364 |
|
var_dump($insert_res); |
365 |
xx_query("UNLOCK TABLES", $con); |
xx_query("UNLOCK TABLES", $con); |
366 |
formLibunit($con, $libunit_id); |
formLibunit($con, $libunit_id); |
367 |
} |
} |
505 |
} |
} |
506 |
else { |
else { |
507 |
// $resource_id = xx_insert_id($con) |
// $resource_id = xx_insert_id($con) |
508 |
$insert_res = xx_prepare_execute("select 1 as id from resource where annotation = ? and author = ? and call_no = ? and cat_num = ? and coverage_detail = ? and date_created = ? and date_modified = ? and edition = ? and infotype_id = ? and other_title = ? and pub_date = ? and publisher = ? and sources_indexed = ? and title = ? and url = ? and account_created = ?", $annotation, $author, $call_no, $cat_num, $coverage_detail, $edition, $infotype_id, $other_title, $pub_date, $publisher, $sources_indexed, $title, $url, $sess_staff_account); |
$insert_res = xx_prepare_execute("select resource_id as id from resource where annotation = ? and author = ? and call_no = ? and cat_num = ? and coverage_detail = ? and edition = ? and infotype_id = ? and other_title = ? and pub_date = ? and publisher = ? and sources_indexed = ? and title = ? and url = ? and account_created = ?", $annotation, $author, $call_no, $cat_num, $coverage_detail, $edition, $infotype_id, $other_title, $pub_date, $publisher, $sources_indexed, $title, $url, $sess_staff_account); |
509 |
list($resource_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
list($resource_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
510 |
xx_query("UNLOCK TABLES", $con); |
xx_query("UNLOCK TABLES", $con); |
511 |
|
|
608 |
} |
} |
609 |
else { |
else { |
610 |
// $new_id = xx_insert_id($con) |
// $new_id = xx_insert_id($con) |
611 |
$insert_res = xx_prepare_execute("select 1 as id from ? where ? = ?", $table, $field, $newValue); |
$insert_res = xx_prepare_execute("select ! from ! where ! = ?", $table."_id", $table, $field, $newValue); |
612 |
list($new_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
list($new_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
613 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
614 |
printf("%s <b>%s</b> successfully added.\n", $display, $newValue_display); |
printf("%s <b>%s</b> successfully added.\n", $display, $newValue_display); |
671 |
} |
} |
672 |
else { |
else { |
673 |
// $service_id = xx_insert_id($con) |
// $service_id = xx_insert_id($con) |
674 |
$insert_res = xx_prepare_execute("select 1 as id from service where address1 = ? and address2 = ? and address3 = ? and address4 = ? and email = ? and fax = ? and nonaff = ? and service = ? and serviceDescr = ? and serviceURL = ? and telephone = ?", $address1, $address2, $address3, $address4, $email, $fax, $nonaff, $service, $serviceDescr, $serviceURL, $telephone); |
$insert_res = xx_prepare_execute("select service_id from service where address1 = ? and address2 = ? and address3 = ? and address4 = ? and email = ? and fax = ? and nonaff = ? and service = ? and serviceDescr = ? and serviceURL = ? and telephone = ?", $address1, $address2, $address3, $address4, $email, $fax, $nonaff, $service, $serviceDescr, $serviceURL, $telephone); |
675 |
list($service_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
list($service_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
676 |
xx_query("UNLOCK TABLES", $con); |
xx_query("UNLOCK TABLES", $con); |
677 |
formService($con, $service_id); |
formService($con, $service_id); |
765 |
|
|
766 |
// Success, call formStaff back. |
// Success, call formStaff back. |
767 |
// $staff_id = xx_insert_id($con) |
// $staff_id = xx_insert_id($con) |
768 |
$insert_res = xx_prepare_execute("select 1 as id from staff where access_id = ? and first_name = ? and last_name = ? and stafftitle_id = ? and staff_account = ? and staff_email = ?", $access_id, $first_name, $last_name, $stafftitle_id, $staff_account, $staff_email); |
$insert_res = xx_prepare_execute("select staff_id from staff where access_id = ? and first_name = ? and last_name = ? and stafftitle_id = ? and staff_account = ? and staff_email = ?", $access_id, $first_name, $last_name, $stafftitle_id, $staff_account, $staff_email); |
769 |
list($staff_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
list($staff_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
770 |
xx_query("UNLOCK TABLES", $con); |
xx_query("UNLOCK TABLES", $con); |
771 |
formStaff($con, $staff_id); |
formStaff($con, $staff_id); |
900 |
} |
} |
901 |
else { |
else { |
902 |
// $subject_id = xx_insert_id($con) |
// $subject_id = xx_insert_id($con) |
903 |
$insert_res = xx_prepare_execute("select 1 as id from subject where subject = ? and subject_descr = ? and sublocation_id = ? and rqs_account_created = ?", $subject, $subject_descr, $sublocation_id, $sess_staff_account); |
$insert_res = xx_prepare_execute("select subject_id from subject where subject = ? and subject_descr = ? and sublocation_id = ? and rqs_account_created = ?", $subject, $subject_descr, $sublocation_id, $sess_staff_account); |
904 |
list($subject_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
list($subject_id) = $insert_res->fetchRow(DB_FETCHMODE_ORDERED); |
905 |
xx_query("UNLOCK TABLES", $con); |
xx_query("UNLOCK TABLES", $con); |
906 |
|
|