+ return SQL_QUERY_ESC($SQL, array(bigintval($id)), $F, $L);
+}
+// ALTER TABLE wrapper function
+function SQL_ALTER_TABLE ($sql, $F, $L) {
+ // This is the default result...
+ $result = false;
+
+ // Determine index/fulltext/unique word
+ $noIndex = ((eregi("INDEX", $sql) == false) && (eregi("FULLTEXT", $sql) == false) && (eregi("UNIQUE", $sql) == false);
+
+ // Shall we add/drop?
+ if (((eregi("ADD", $sql) > 0) || (eregi("DROP", $sql) > 0)) && ($noIndex)) {
+ // Extract table name
+ $tableArray = explode(" ", $sql);
+ $tableName = str_replace("`", "", $tableArray[2]);
+
+ // And column name as well
+ $columnName = str_replace("`", "", $tableArray[4]);
+
+ // Get column information
+ $result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'",
+ array($tableName, $columnName), $F, $L);
+
+ // Do we have no entry on ADD or an entry on DROP?
+ if (((SQL_NUMROWS($result) == 0) && (eregi("ADD", $sql) > 0)) || ((SQL_NUMROWS($result) == 1) && (eregi("DROP", $sql) > 0))) {
+ // Do the query
+ $result = SQL_QUERY($sql, $F, $L, false);
+ } // END - if
+ } else {
+ // Send it to the SQL_QUERY() function
+ $result = SQL_QUERY($sql, $F, $L, false);
+ }
+
+ // Return result
+ return $result;