--- trunk/admin/include/subject_builder.php 2004/03/04 22:43:17 41 +++ trunk/admin/include/subject_builder.php 2004/03/04 22:43:50 42 @@ -44,8 +44,8 @@ . " AND othersub_id = " . $subject_id_array[$subscript]; - $rs = mysql_query($sql); - if (mysql_num_rows($rs) == 0) { + $rs = xx_query($sql); + if (xx_num_rows($rs) == 0) { $sql = "INSERT INTO sub_othersub (subject_id, othersub_id) VALUES (" . $subject_id @@ -53,13 +53,13 @@ . $subject_id_array[$subscript] . ")"; - if (!mysql_query($sql, $con)){ + if (!xx_query($sql, $con)){ sql_err($con); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } // bad write else { - mysql_query("UNLOCK TABLES", $con); + xx_query("UNLOCK TABLES", $con); } // good write of sub_othersub @@ -92,8 +92,8 @@ . " AND page_id = " . $page_id_array[$subscript]; - $rs = mysql_query($sql); - if (mysql_num_rows($rs) == 0) { + $rs = xx_query($sql); + if (xx_num_rows($rs) == 0) { $sql = "INSERT INTO sub_page (subject_id, page_id) VALUES (" . $subject_id @@ -101,13 +101,13 @@ . $page_id_array[$subscript] . ")"; - if (!mysql_query($sql, $con)){ + if (!xx_query($sql, $con)){ sql_err($con); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } // bad write else { - mysql_query("UNLOCK TABLES", $con); + xx_query("UNLOCK TABLES", $con); } // good write of sub_page @@ -139,13 +139,13 @@ . $subject_id . " AND infotype_id = " . $infotype_id; - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } header("Location: subject_builder.phtml?subject_id=" . $subject_id); @@ -174,15 +174,15 @@ . $key_list_array[$element]; // Failed - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } // Succeeded else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } } @@ -211,15 +211,15 @@ . $key_list_array[$element]; // Failed - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } // Succeeded else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } } @@ -252,8 +252,8 @@ // Find the default information type for this resource $sql = "SELECT infotype_id FROM resource WHERE resource_id = " . $resource_id; - $rs = mysql_query($sql, $con); - $row = mysql_fetch_array ($rs); + $rs = xx_query($sql, $con); + $row = xx_fetch_array ($rs); $infotype_id = $row["infotype_id"]; // Check to see if it's already there. @@ -293,13 +293,13 @@ // Debugging // printf("sql was: %s
", $sql); - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } } @@ -325,15 +325,15 @@ . $subject_id; // Failed - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } // Succeeded else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } header("Location: subject_builder.phtml?subject_id=" . $subject_id); @@ -354,15 +354,15 @@ . $subject_id; // Failed - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } // Succeeded else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } header("Location: subject_builder.phtml?subject_id=" . $subject_id); @@ -385,15 +385,15 @@ . $subject_id; // Failed - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } // Succeeded else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } } @@ -425,13 +425,13 @@ . $infotype_id . ")"; - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } // If the user opted for default resource description, void out the incoming $description; @@ -461,13 +461,13 @@ . $description . "')"; - if (!mysql_query ($sql, $con)){ + if (!xx_query ($sql, $con)){ sql_err($sql); - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); bailout(); } else { - mysql_query ("UNLOCK TABLES", $con); + xx_query ("UNLOCK TABLES", $con); } header("Location: subject_builder.phtml?subject_id=" . $subject_id . "#" . $resource_id);