What's in an upgrade script? Let's take a few representative examples of code and explain what they do, so that you get an idea of what is going on in such a script[1]:
UPDATE (Version number):
the PHP-Nuke version is updated in the nuke_config table through the UPDATE command:
// <application>PHP-Nuke</application> Version Number Update
$db->sql_query("UPDATE ".$prefix."_config SET Version_Num='6.7'");
UPDATE (Forums):
some forum parameters are modified through the UPDATE command.
// <application>PHP-Nuke</application> Forums Update
$db->sql_query("UPDATE ".$prefix."_bbconfig SET config_value='.0.4' where
config_name='version'");
$db->sql_query("UPDATE ".$prefix."_bbconfig SET config_value='3600' where
config_name='session_length'");
INSERT:
some values are inserted into the nuke_bbconfig table through the INSERT command:
$db->sql_query("INSERT INTO ".$prefix."_bbconfig VALUES ('config_id','1')");
DELETE:
a recorde is deleted from the nuke_headlines table through the DELETE command
$db->sql_query("DELETE FROM ".$prefix."_headlines WHERE
sitename='Linux.com'");
DROP TABLE:
the whole table nuke_priv_msgs is deleted from the database through the DROP TABLE command.