--- branches/paul/admin/include/delete.php 2004/03/18 19:58:18 68
+++ branches/paul_xx/admin/include/delete.php 2004/03/18 20:01:09 69
@@ -82,15 +82,15 @@
// First clear out any coursescribe pages
$sql = "UPDATE course SET campus_id = NULL WHERE campus_id = " . $campus_id;
- if (mysql_tryquery($sql)) printf("Campus purged from assignments to course pages.
\n");
+ if (xx_tryquery($sql)) printf("Campus purged from assignments to course pages.
\n");
// Delete from the coursesub table
$sql = "UPDATE coursesub SET campus_id = 1 WHERE campus_id =" . $campus_id;
- if (mysql_tryquery ($sql)) printf("Removed from affected Course Subjects.
\n");
+ if (xx_tryquery ($sql)) printf("Removed from affected Course Subjects.
\n");
// Delete from the campus table
$sql = "DELETE FROM campus WHERE campus_id =" . $campus_id;
- if (mysql_tryquery ($sql)) printf("Removed this campus successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this campus successfully.");
}
else printf("Cannot delete Campus ID# 1, it acts as a system placeholder.");
@@ -166,11 +166,11 @@
else {
// Delete from the sub_coursesub table
$sql = "DELETE FROM sub_coursesub WHERE coursesub_id = " . $coursesub_id;
- if (mysql_tryquery ($sql)) printf("Subject-Course Subject assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Subject-Course Subject assignments removed.
\n");
// Delete from the coursesub table
$sql = "DELETE FROM coursesub WHERE coursesub_id =" . $coursesub_id;
- if (mysql_tryquery ($sql)) printf("Removed this Course Subject successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this Course Subject successfully.");
}
}
@@ -259,11 +259,11 @@
// First clear out the course_personnel assignments
$sql = "DELETE FROM course_personnel WHERE faculty_id = " . $faculty_id;
- if (mysql_tryquery ($sql)) printf("Faculty person purged from assignments to course pages.
\n");
+ if (xx_tryquery ($sql)) printf("Faculty person purged from assignments to course pages.
\n");
// Delete from the faculty table
$sql = "DELETE FROM faculty WHERE faculty_id =" . $faculty_id;
- if (mysql_tryquery ($sql)) printf("Removed this faculty person successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this faculty person successfully.");
}
else printf ("Cannot delete Faculty ID# 1, it acts as a system placeholder.");
@@ -329,11 +329,11 @@
// Delete all resource_feature assignments
$sql = "DELETE from res_feature WHERE feature_id =" . $feature_id;
- if (mysql_tryquery ($sql)) printf("Removed resource-feature associations.
\n");
+ if (xx_tryquery ($sql)) printf("Removed resource-feature associations.
\n");
// Delete from feature table
$sql = "DELETE FROM feature WHERE feature_id =" . $feature_id;
- if (mysql_tryquery ($sql)) printf("Removed feature successfully.");
+ if (xx_tryquery ($sql)) printf("Removed feature successfully.");
}
else printf ("Cannot delete Feature ID# 1, it acts as a system placeholder.");
@@ -400,15 +400,15 @@
// Delete all res_sub_infotype assignments
$sql = "DELETE from res_sub_infotype WHERE infotype_id =" . $infotype_id;
- if (mysql_tryquery ($sql)) printf("Removed resource-subject-infotype associations.
\n");
+ if (xx_tryquery ($sql)) printf("Removed resource-subject-infotype associations.
\n");
// Set (N/A) type in resource table
$sql = "UPDATE resource SET infotype_id = 1 WHERE infotype_id =" . $infotype_id;
- if (mysql_tryquery ($sql)) printf("Set default information types for affects resources to (N/A).
\n");
+ if (xx_tryquery ($sql)) printf("Set default information types for affects resources to (N/A).
\n");
// Delete from infotype table
$sql = "DELETE FROM infotype WHERE infotype_id =" . $infotype_id;
- if (mysql_tryquery ($sql)) printf("Removed this information type successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this information type successfully.");
}
else printf ("Cannot delete Information Type ID# 1, it acts as a system placeholder.");
@@ -473,11 +473,11 @@
// First delete from libunit_staff
if ($libunit_id > 1) {
$sql = "DELETE FROM libunit_staff WHERE libunit_id = " . $libunit_id;
- if (mysql_tryquery ($sql)) printf("Deleted affected Library Unit staff assignments.
\n");
+ if (xx_tryquery ($sql)) printf("Deleted affected Library Unit staff assignments.
\n");
// Delete from the libunit table
$sql = "DELETE FROM libunit WHERE libunit_id =" . $libunit_id;
- if (mysql_tryquery ($sql)) printf("Removed this Library Unit successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this Library Unit successfully.");
}
else printf ("Cannot delete Library Unit ID# 1, it acts as a system placeholder.");
@@ -540,7 +540,7 @@
. $libunit_id
. " AND staff_id = "
. $key_list_array[$element];
- mysql_tryquery($sql);
+ xx_tryquery($sql);
}
// Call the libunit form back
formLibunit($libunit_id);
@@ -570,19 +570,19 @@
// First delete from res_loc
$sql = "DELETE FROM res_loc WHERE location_id = " . $location_id;
- if (mysql_tryquery ($sql)) printf("Affected resource-location assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Affected resource-location assignments removed.
\n");
// Delete from sub_loc
$sql = "DELETE FROM sub_loc WHERE location_id =" . $location_id;
- if (mysql_tryquery ($sql)) printf("Affected subject-location assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Affected subject-location assignments removed.
\n");
// Delete primary subject locations
$sql = "UPDATE subject SET sublocation_id = NULL WHERE sublocation_id =" . $location_id;
- if (mysql_tryquery ($sql)) printf("Affected primary subject locations set to NULL.
\n");
+ if (xx_tryquery ($sql)) printf("Affected primary subject locations set to NULL.
\n");
// Delete from serv_loc
$sql = "DELETE FROM serv_loc WHERE location_id =" . $location_id;
- if (mysql_tryquery ($sql)) printf("Affected service-location assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Affected service-location assignments removed.
\n");
/********************************
** Update affected CL/PS pages **
@@ -591,8 +591,8 @@
// First, get the default location description and title
$sql = "SELECT location, location_descr FROM location WHERE location_id = "
. $location_id;
- $rs = mysql_tryquery($sql);
- $row = mysql_fetch_array ($rs, MYSQL_ASSOC);
+ $rs = xx_tryquery($sql);
+ $row = xx_fetch_array ($rs, xx_ASSOC);
$location = $row["location"];
$location_descr = $row["location_descr"];
@@ -612,7 +612,7 @@
. $delMessage
. "'), location_id = NULL WHERE location_id =" . $location_id
. " AND (element_descr IS NOT NULL OR element_descr != '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
// Next, update all of the elements using this resource without a custom description.
$sql = "UPDATE element SET label = '"
@@ -621,7 +621,7 @@
. $location_descr
. "', location_id = NULL WHERE location_id =" . $location_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions.
\n");
/**********************************
** Update affected CL/PS buffers **
@@ -634,7 +634,7 @@
. $delMessage
. "'), location_id = NULL WHERE location_id =" . $location_id
. " AND (element_descr IS NOT NULL OR element_descr != '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions (buffers).
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions (buffers).
\n");
// Next, update all of the elements using this location without a custom description.
$sql = "UPDATE pastebuffer SET label = '"
@@ -643,11 +643,11 @@
. $location_descr
. "', location_id = NULL WHERE location_id =" . $location_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions (buffers).
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions (buffers).
\n");
// Delete from location
$sql = "DELETE FROM location WHERE location_id =" . $location_id;
- if (mysql_tryquery ($sql)) printf("Location successfully removed.");
+ if (xx_tryquery ($sql)) printf("Location successfully removed.");
}
else printf ("Cannot delete Location ID# 1, it acts as a system placeholder.");
@@ -728,8 +728,8 @@
. $masterinfotype_id;
// Fetch the values
- $rs = mysql_tryquery($sql);
- while ($row = mysql_fetch_array ($rs, MYSQL_ASSOC)) {
+ $rs = xx_tryquery($sql);
+ while ($row = xx_fetch_array ($rs, xx_ASSOC)) {
$infotype_id = $row["infotype_id"];
$infotype = $row["infotype"];
@@ -738,20 +738,20 @@
// Delete all res_sub_infotype assignments
$sql = "DELETE from res_sub_infotype WHERE infotype_id =" . $infotype_id;
- if (mysql_tryquery ($sql)) printf("Removed resource-subject-infotype associations.
\n");
+ if (xx_tryquery ($sql)) printf("Removed resource-subject-infotype associations.
\n");
// Set (N/A) type in resource table
$sql = "UPDATE resource SET infotype_id = 1 WHERE infotype_id =" . $infotype_id;
- if (mysql_tryquery ($sql)) printf("Set default information types for affects resources to (N/A).
\n");
+ if (xx_tryquery ($sql)) printf("Set default information types for affects resources to (N/A).
\n");
// Delete from infotype table
$sql = "DELETE FROM infotype WHERE infotype_id =" . $infotype_id;
- if (mysql_tryquery ($sql)) printf("Removed affected specific information types.
\n");
+ if (xx_tryquery ($sql)) printf("Removed affected specific information types.
\n");
}
// Delete from masterinfotype table
$sql = "DELETE FROM masterinfotype WHERE masterinfotype_id =" . $masterinfotype_id;
- if (mysql_tryquery ($sql)) printf("Removed Master Information Type successfully.");
+ if (xx_tryquery ($sql)) printf("Removed Master Information Type successfully.");
}
else printf ("Cannot delete Master Information Type ID# 1, it acts as a system placeholder.");
@@ -829,15 +829,15 @@
// Delete from sub_mastersubject
$sql = "DELETE FROM sub_mastersubject WHERE mastersubject_id =" . $mastersubject_id;
- if (mysql_tryquery ($sql)) printf("Affected subject-mastersubject assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Affected subject-mastersubject assignments removed.
\n");
// Delete from res_mastersubject
$sql = "DELETE FROM res_mastersubject WHERE mastersubject_id =" . $mastersubject_id;
- if (mysql_tryquery ($sql)) printf("Affected resource-mastersubject assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Affected resource-mastersubject assignments removed.
\n");
// Delete from mastersubject table
$sql = "DELETE FROM mastersubject WHERE mastersubject_id =" . $mastersubject_id;
- if (mysql_tryquery ($sql)) printf("Removed Master Subject successfully.");
+ if (xx_tryquery ($sql)) printf("Removed Master Subject successfully.");
}
else printf ("Cannot delete Master Subject ID# 1, it acts as a system placeholder.");
@@ -879,16 +879,16 @@
// Check subjects
$sql = "SELECT COUNT(sm.subject_id) as num_subjects FROM sub_mastersubject sm WHERE sm.mastersubject_id ="
. $mastersubject_id;
- $rs = mysql_tryquery($sql);
- $row = mysql_fetch_array ($rs, MYSQL_ASSOC);
+ $rs = xx_tryquery($sql);
+ $row = xx_fetch_array ($rs, xx_ASSOC);
$num_subjects = $row["num_subjects"];
if ($num_subjects > 0) $problem = 1;
// Check resources
$sql = "SELECT COUNT(rm.resource_id) as num_resources FROM res_mastersubject rm WHERE rm.mastersubject_id = "
. $mastersubject_id;
- $rs = mysql_tryquery($sql);
- $row = mysql_fetch_array ($rs, MYSQL_ASSOC);
+ $rs = xx_tryquery($sql);
+ $row = xx_fetch_array ($rs, xx_ASSOC);
$num_resources = $row["num_resources"];
if ($num_resources > 0) $problem = 1;
@@ -940,7 +940,7 @@
. $resource_id
. " AND feature_id = "
. $key_list_array[$element];
- mysql_tryquery ($sql);
+ xx_tryquery ($sql);
}
// Call the resource form back
formResource($resource_id, 0, 0, '');
@@ -964,7 +964,7 @@
. $resource_id
. " AND location_id = "
. $key_list_array[$element];
- mysql_tryquery ($sql);
+ xx_tryquery ($sql);
}
// Call the resource form back
formResource($resource_id, 0, 0, '');
@@ -989,7 +989,7 @@
. $resource_id
. " AND mastersubject_id = "
. $key_list_array[$element];
- mysql_tryquery ($sql);
+ xx_tryquery ($sql);
}
// Call the resource form back
formResource($resource_id, 0, 0, '');
@@ -1016,19 +1016,19 @@
// First delete all related rows in res_sub_infotype
$sql = "DELETE FROM res_sub_infotype WHERE resource_id = " . $resource_id;
- if (mysql_tryquery ($sql)) printf("Resource removed from all resource-subject-infotype assignments.
\n");
+ if (xx_tryquery ($sql)) printf("Resource removed from all resource-subject-infotype assignments.
\n");
// Delete from the res_loc table
$sql = "DELETE FROM res_loc WHERE resource_id =" . $resource_id;
- if (mysql_tryquery ($sql)) printf("Removed from resource-location table.
\n");
+ if (xx_tryquery ($sql)) printf("Removed from resource-location table.
\n");
// Delete from the res_mastersubject table
$sql = "DELETE FROM res_mastersubject WHERE resource_id =" . $resource_id;
- if (mysql_tryquery ($sql)) printf("Removed from resource-mastersubject table.
\n");
+ if (xx_tryquery ($sql)) printf("Removed from resource-mastersubject table.
\n");
// Delete from the res_feature table
$sql = "DELETE FROM res_feature WHERE resource_id =" . $resource_id;
- if (mysql_tryquery ($sql)) printf("Removed from resource-feature table.
\n");
+ if (xx_tryquery ($sql)) printf("Removed from resource-feature table.
\n");
/********************************
** Update affected CL/PS pages **
@@ -1037,8 +1037,8 @@
// First, get the default resource description and title
$sql = "SELECT annotation, title FROM resource WHERE resource_id = "
. $resource_id;
- $rs = mysql_tryquery($sql);
- $row = mysql_fetch_array ($rs, MYSQL_ASSOC);
+ $rs = xx_tryquery($sql);
+ $row = xx_fetch_array ($rs, xx_ASSOC);
$annotation = $row["annotation"];
$title = $row["title"];
@@ -1058,7 +1058,7 @@
. $delMessage
. "'), resource_id = NULL WHERE resource_id =" . $resource_id
. " AND (element_descr IS NOT NULL OR element_descr != '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
// Next, update all of the elements using this resource without a custom description.
$sql = "UPDATE element SET label = '"
@@ -1067,7 +1067,7 @@
. $annotation
. "', resource_id = NULL WHERE resource_id =" . $resource_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions.
\n");
/***************************************
** Update affected CL/PS copy buffers **
@@ -1080,7 +1080,7 @@
. $delMessage
. "'), resource_id = NULL WHERE resource_id =" . $resource_id
. " AND (element_descr IS NOT NULL OR element_descr != '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions (buffers).
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions (buffers).
\n");
// Next, update all of the elements using this resource without a custom description.
$sql = "UPDATE pastebuffer SET label = '"
@@ -1089,11 +1089,11 @@
. $annotation
. "', resource_id = NULL WHERE resource_id =" . $resource_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions (buffers).
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions (buffers).
\n");
// Delete from the resource table
$sql = "DELETE FROM resource WHERE resource_id =" . $resource_id;
- if (mysql_tryquery ($sql)) printf("Successfully removed from all tables.");
+ if (xx_tryquery ($sql)) printf("Successfully removed from all tables.");
printf("
\n");
msgTableClose();
@@ -1169,11 +1169,11 @@
// First delete all related rows in serv_servtype
$sql = "DELETE FROM serv_servtype WHERE service_id = " . $service_id;
- if (mysql_tryquery ($sql)) printf("Service removed from all service-servicetype assignments.
\n");
+ if (xx_tryquery ($sql)) printf("Service removed from all service-servicetype assignments.
\n");
// Delete from the serv_loc table
$sql = "DELETE FROM serv_loc WHERE service_id =" . $service_id;
- if (mysql_tryquery ($sql)) printf("Removed from service-location table.
\n");
+ if (xx_tryquery ($sql)) printf("Removed from service-location table.
\n");
/********************************
** Update affected CL/PS pages **
@@ -1182,8 +1182,8 @@
// First, get the default service description and title
$sql = "SELECT service, serviceDescr FROM service WHERE service_id = "
. $service_id;
- $rs = mysql_tryquery($sql);
- $row = mysql_fetch_array ($rs, MYSQL_ASSOC);
+ $rs = xx_tryquery($sql);
+ $row = xx_fetch_array ($rs, xx_ASSOC);
$service = $row["service"];
$serviceDescr = $row["serviceDescr"];
@@ -1203,7 +1203,7 @@
. $delMessage
. "'), service_id = NULL WHERE service_id =" . $service_id
. " AND (element_descr IS NOT NULL OR element_descr != '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
// Next, update all of the elements using this service without a custom description.
$sql = "UPDATE element SET label = '"
@@ -1213,7 +1213,7 @@
. "', service_id = NULL WHERE service_id =" . $service_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions.
\n");
/***************************************
** Update affected CP/PS copy buffers **
@@ -1226,7 +1226,7 @@
. $delMessage
. "'), service_id = NULL WHERE service_id =" . $service_id
. " AND (element_descr IS NOT NULL OR element_descr != '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions (buffers).
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions (buffers).
\n");
// Next, update all of the elements using this service without a custom description.
$sql = "UPDATE pastebuffer SET label = '"
@@ -1235,11 +1235,11 @@
. $serviceDescr
. "', service_id = NULL WHERE service_id =" . $service_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions (buffers).
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions (buffers).
\n");
// Delete from the service table
$sql = "DELETE FROM service WHERE service_id =" . $service_id;
- if (mysql_tryquery ($sql)) printf("Successfully removed from all tables.");
+ if (xx_tryquery ($sql)) printf("Successfully removed from all tables.");
printf("
\n");
msgTableClose();
@@ -1311,11 +1311,11 @@
// Delete from serv_servtype table
$sql = "DELETE FROM serv_servtype WHERE servicetype_id =" . $servicetype_id;
- if (mysql_tryquery ($sql)) printf("Removed Service-Service Type associations.
\n");
+ if (xx_tryquery ($sql)) printf("Removed Service-Service Type associations.
\n");
// Delete from servicetype table
$sql = "DELETE FROM servicetype WHERE servicetype_id =" . $servicetype_id;
- if (mysql_tryquery ($sql)) printf("Removed Service Type successfully.");
+ if (xx_tryquery ($sql)) printf("Removed Service Type successfully.");
}
else printf ("Cannot delete Service Type ID# 1, it acts as a system placeholder.");
@@ -1382,7 +1382,7 @@
. $service_id
. " AND location_id = "
. $key_list_array[$element];
- mysql_tryquery ($sql);
+ xx_tryquery ($sql);
}
// Call the service form back
formService($service_id, 0, 0);
@@ -1407,7 +1407,7 @@
. $service_id
. " AND servicetype_id = "
. $key_list_array[$element];
- mysql_tryquery ($sql);
+ xx_tryquery ($sql);
}
// Call the service form back
formService($service_id, 0, 0);
@@ -1436,15 +1436,15 @@
// First delete all related rows in sub_staff
$sql = "DELETE FROM sub_staff WHERE staff_id = " . $staff_id;
- if (mysql_tryquery ($sql)) printf("All subject-staff assignments for this staff person removed.
\n");
+ if (xx_tryquery ($sql)) printf("All subject-staff assignments for this staff person removed.
\n");
// Delete from the course_personnel table
$sql = "DELETE FROM course_personnel WHERE staff_id =" . $staff_id;
- if (mysql_tryquery ($sql)) printf("Removed this staff person from course personnel tables.
\n");
+ if (xx_tryquery ($sql)) printf("Removed this staff person from course personnel tables.
\n");
// Delete all related rows in page_staff
$sql = "DELETE FROM page_staff WHERE staff_id = " . $staff_id;
- if (mysql_tryquery ($sql)) printf("All page-staff assignments for this staff person removed.
\n");
+ if (xx_tryquery ($sql)) printf("All page-staff assignments for this staff person removed.
\n");
/********************************
** Update affected CL/PS pages **
@@ -1453,8 +1453,8 @@
// First, get the staff fields
$sql = "SELECT first_name, last_name FROM staff WHERE staff_id = "
. $staff_id;
- $rs = mysql_tryquery($sql);
- $row = mysql_fetch_array ($rs, MYSQL_ASSOC);
+ $rs = xx_tryquery($sql);
+ $row = xx_fetch_array ($rs, xx_ASSOC);
$first_name = $row["first_name"];
$last_name = $row["last_name"];
@@ -1474,7 +1474,7 @@
. $delMessage
. "'), staff_id = NULL WHERE staff_id =" . $staff_id
. " AND element_descr IS NOT NULL AND element_descr <> ''";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
// Handle blank staff description elements
$sql = "UPDATE element SET label = '"
@@ -1483,7 +1483,7 @@
. $delMessage
. "', staff_id = NULL WHERE staff_id =" . $staff_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to blank PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to blank PageScribe descriptions.
\n");
/**********************************
** Update affected CL/PS buffers **
@@ -1496,7 +1496,7 @@
. $delMessage
. "'), staff_id = NULL WHERE staff_id =" . $staff_id
. " AND element_descr IS NOT NULL AND element_descr <> ''";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
// Handle blank staff description pastebuffer elements
$sql = "UPDATE pastebuffer SET label = '"
@@ -1505,11 +1505,11 @@
. $delMessage
. "', staff_id = NULL WHERE staff_id =" . $staff_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to blank PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to blank PageScribe descriptions.
\n");
// Delete from the staff table
$sql = "DELETE FROM staff WHERE staff_id =" . $staff_id;
- if (mysql_tryquery ($sql)) printf("Removed this staff person successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this staff person successfully.");
}
else printf ("Cannot delete Staff ID's #1-2. Operation cancelled.");
@@ -1589,7 +1589,7 @@
. $staff_id
. " AND libunit_id = "
. $key_list_array[$element];
- mysql_tryquery($sql);
+ xx_tryquery($sql);
}
// Call the staff form back
formStaff($staff_id);
@@ -1617,7 +1617,7 @@
. $staff_id
. " AND subject_id = "
. $key_list_array[$element];
- mysql_tryquery($sql);
+ xx_tryquery($sql);
}
// Call the staff form back
formStaff($staff_id);
@@ -1641,11 +1641,11 @@
if ($stafftitle_id > 1) {
// First update all rows in staff to (N/A)
$sql = "UPDATE staff SET stafftitle_id = 1 WHERE stafftitle_id = " . $stafftitle_id;
- if (mysql_tryquery ($sql)) printf("Successfully set affected staff titles to (N/A).
\n");
+ if (xx_tryquery ($sql)) printf("Successfully set affected staff titles to (N/A).
\n");
// Delete from the title table
$sql = "DELETE FROM stafftitle WHERE stafftitle_id =" . $stafftitle_id;
- if (mysql_tryquery ($sql)) printf("Removed this staff title successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this staff title successfully.");
}
else printf ("Cannot delete Staff Title ID# 1, it acts as a system placeholder.");
@@ -1711,11 +1711,11 @@
if ($style_id > 2) {
// First update all affected rows in page to (N/A)
$sql = "UPDATE page SET style_id = 1 WHERE style_id = " . $style_id;
- if (mysql_tryquery ($sql)) printf("Successfully set affected page styles to (N/A).
\n");
+ if (xx_tryquery ($sql)) printf("Successfully set affected page styles to (N/A).
\n");
// Delete from the style table
$sql = "DELETE FROM style WHERE style_id =" . $style_id;
- if (mysql_tryquery ($sql)) printf("Removed this style successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this style successfully.");
}
else {
@@ -1789,7 +1789,7 @@
. $subject_id
. " AND coursesub_id = "
. $key_list_array[$element];
- mysql_tryquery ($sql);
+ xx_tryquery ($sql);
}
// Call the subject form back
formSubject($subject_id);
@@ -1817,34 +1817,34 @@
// First delete all related rows in res_sub_infotype
$sql = "DELETE FROM res_sub_infotype WHERE subject_id = " . $subject_id;
- if (mysql_tryquery ($sql)) printf("Resource-subject-information type associations removed.
\n");
+ if (xx_tryquery ($sql)) printf("Resource-subject-information type associations removed.
\n");
// Delete from the sub_loc table
$sql = "DELETE FROM sub_loc WHERE subject_id =" . $subject_id;
- if (mysql_tryquery ($sql)) printf("Subject-location associations removed.
\n");
+ if (xx_tryquery ($sql)) printf("Subject-location associations removed.
\n");
// Delete from the sub_mastersubject table
$sql = "DELETE FROM sub_mastersubject WHERE subject_id =" . $subject_id;
- if (mysql_tryquery ($sql)) printf("Subject-mastersubject associations removed.
\n");
+ if (xx_tryquery ($sql)) printf("Subject-mastersubject associations removed.
\n");
// Delete from the sub_staff table
$sql = "DELETE FROM sub_staff WHERE subject_id =" . $subject_id;
- if (mysql_tryquery ($sql)) printf("Subject-staff assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Subject-staff assignments removed.
\n");
// Delete from the sub_coursesub table
$sql = "DELETE FROM sub_coursesub WHERE subject_id =" . $subject_id;
- if (mysql_tryquery ($sql)) printf("Subject-Course Subject assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Subject-Course Subject assignments removed.
\n");
// Delete from the sub_page table
$sql = "DELETE FROM sub_page WHERE subject_id =" . $subject_id;
- if (mysql_tryquery ($sql)) printf("Subject-Page assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Subject-Page assignments removed.
\n");
// Delete from the sub_othersub table
$sql = "DELETE FROM sub_othersub WHERE othersub_id ="
. $subject_id
. " OR subject_id = "
. $subject_id;
- if (mysql_tryquery ($sql)) printf("Subject-Other Subject assignments removed.
\n");
+ if (xx_tryquery ($sql)) printf("Subject-Other Subject assignments removed.
\n");
/********************************
** Update affected CL/PS pages **
@@ -1853,8 +1853,8 @@
// First, get the default subject description and title
$sql = "SELECT subject, subject_descr FROM subject WHERE subject_id = "
. $subject_id;
- $rs = mysql_tryquery($sql);
- $row = mysql_fetch_array ($rs, MYSQL_ASSOC);
+ $rs = xx_tryquery($sql);
+ $row = xx_fetch_array ($rs, xx_ASSOC);
$subject = $row["subject"];
$subject_descr = $row["subject_descr"];
@@ -1874,7 +1874,7 @@
. $delMessage
. "'), subject_id = NULL WHERE subject_id =" . $subject_id
. " AND (element_descr IS NOT NULL OR element_descr != '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions.
\n");
// Next, update all of the elements using this resource without a custom description.
$sql = "UPDATE element SET label = '"
@@ -1883,7 +1883,7 @@
. $subject_descr
. "', subject_id = NULL WHERE subject_id =" . $subject_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions.
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions.
\n");
/***************************************
** Update affected CL/PS copy buffers **
@@ -1896,7 +1896,7 @@
. $delMessage
. "'), subject_id = NULL WHERE subject_id =" . $subject_id
. " AND (element_descr IS NOT NULL OR element_descr != '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions (buffers).
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to custom PageScribe descriptions (buffers).
\n");
// Next, update all of the elements using this location without a custom description.
$sql = "UPDATE pastebuffer SET label = '"
@@ -1905,11 +1905,11 @@
. $subject_descr
. "', subject_id = NULL WHERE subject_id =" . $subject_id
. " AND (element_descr IS NULL OR element_descr = '')";
- if (mysql_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions (buffers).
\n");
+ if (xx_tryquery ($sql)) printf("Added delete message to default PageScribe descriptions (buffers).
\n");
// Finally delete from the subject table
$sql = "DELETE FROM subject WHERE subject_id =" . $subject_id;
- if (mysql_tryquery ($sql)) printf("Successfully removed this subject from the system.");
+ if (xx_tryquery ($sql)) printf("Successfully removed this subject from the system.");
}
else printf ("Cannot delete Subject ID# 1, it acts as a system placeholder.");
@@ -1980,7 +1980,7 @@
. $subject_id
. " AND location_id = "
. $key_list_array[$element];
- mysql_tryquery($sql);
+ xx_tryquery($sql);
}
// Call the subject form back
formSubject($subject_id);
@@ -2006,7 +2006,7 @@
. $subject_id
. " AND mastersubject_id = "
. $key_list_array[$element];
- mysql_tryquery($sql);
+ xx_tryquery($sql);
}
// Call the subject form back
formSubject($subject_id);
@@ -2031,7 +2031,7 @@
. $subject_id
. " AND staff_id = "
. $key_list_array[$element];
- mysql_tryquery($sql);
+ xx_tryquery($sql);
}
// Call the subject form back
formSubject($subject_id);
@@ -2057,11 +2057,11 @@
// Delete all course term assignments
$sql = "UPDATE course SET term_id = NULL WHERE term_id =" . $term_id;
- if (mysql_tryquery ($sql)) printf("Removed this term from affected course pages.
\n");
+ if (xx_tryquery ($sql)) printf("Removed this term from affected course pages.
\n");
// Delete from term table
$sql = "DELETE FROM term WHERE term_id =" . $term_id;
- if (mysql_tryquery ($sql)) printf("Removed term successfully.");
+ if (xx_tryquery ($sql)) printf("Removed term successfully.");
}
else printf ("Cannot delete Term ID# 1, it acts as a system placeholder.");
@@ -2127,11 +2127,11 @@
// First update affected resources
$sql = "UPDATE resource SET vendor_id = NULL WHERE vendor_id = "
. $vendor_id;
- if (mysql_tryquery ($sql)) printf("Vendor purged from assignments to resources.
\n");
+ if (xx_tryquery ($sql)) printf("Vendor purged from assignments to resources.
\n");
// Delete from the vendor table
$sql = "DELETE FROM vendor WHERE vendor_id =" . $vendor_id;
- if (mysql_tryquery ($sql)) printf("Removed this vendor successfully.");
+ if (xx_tryquery ($sql)) printf("Removed this vendor successfully.");
}
else printf ("Cannot delete Vendor ID# 1, it acts as a system placeholder.");