- // Run SQL command
- $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
- }
- }
+ // Do we have an "ALTER TABLE" command?
+ //* DEBUG: */ echo __FUNCTION__.":SQL={$SQL}<br />\n";
+ if (substr(strtolower($sql), 0, 11) == "alter table") {
+ // Analyse the alteration command
+ SQL_ALTER_TABLE($sql, __FILE__, __LINE__);
+ } else {
+ // Run regular SQL command
+ $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+ }
+
+ // An SQL has been executed
+ $sqlRan = true;
+ } // END - if
+ } // END - foreach
+
+ // Removal mode?
+ if ($EXT_LOAD_MODE == "remove") {
+ // Delete this extension (remember to remove it from your server *before* you click on welcome!
+ $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE id=%s LIMIT 1",
+ array($id), __FILE__, __LINE__);
+ } // END - if
+
+ //* DEBUG: */ echo __FUNCTION__.":mode={$EXT_LOAD_MODE}<br />\n";