Im still not having any luck. This is what I did:
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
$DB_site->reporterror = 0;
if ($current_version < $script_version)
{
$DB_site->query("ALTER TABLE `" . TABLE_PREFIX . "rpg_lottery`");
if ($RPG_UPGRADE_DONE === true)
{
$DB_site->query("
UPDATE `" . TABLE_PREFIX . "setting` SET
value = '" . intval($script_version) . "',
defaultvalue = '" . intval($script_version) . "'
WHERE varname = '" . addslashes('rpg_versionnumber') . "'
");
print_description_row('Updated Setting: <b><i>Version Number</i></b>');
}
}
$DB_site->reporterror = 1;
/*================================================= =====================*\
When I run it like this I get this error:
Database error in vBulletin 3.0.7:
Invalid SQL: ALTER TABLE `user` ADD `inmonsterbattle` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL
mysql error: Duplicate column name 'inmonsterbattle'
mysql error number: 1060
|