PDA

View Full Version : Invalid SQL: CREATE TABLE at installation.


adrianna
02-06-2005, 04:24 PM
Okay, I have it downloaded now, however i Receive this error message when I try to install it using the "battleinstall.php":

Database error in vBulletin 3.0.6:

Invalid SQL: CREATE TABLE `rpg_clan` (
`clanid` smallint(5) unsigned NOT NULL auto_increment,
`title` varchar(50) NOT NULL default '',
`pass` varchar(50) NOT NULL default '',
`leader` varchar(50) NOT NULL default '',
`clanpoints` varchar(5) NOT NULL default '',
`logo` varchar(100) NOT NULL default '',
`ally` varchar(10) NOT NULL default '0',
`enemy` varchar(10) NOT NULL default '0',
`maxmem` int(3) NOT NULL default '5',
`col1` varchar(5) NOT NULL default '0',
`col2` varchar(5) NOT NULL default '0',
`col3` varchar(5) NOT NULL default '0',
`col4` varchar(5) NOT NULL default '0',
`cm_col_access` varchar(5) NOT NULL default '0',
`ci_col_access` varchar(5) NOT NULL default '0',
`rm_col_access` varchar(5) NOT NULL default '0',
`clanmidiurl` varchar(100) NOT NULL default '',
PRIMARY KEY (`clanid`)
) TYPE=MyISAM;
mysql error: Table 'rpg_clan' already exists

mysql error number: 1050

Marco van Herwaarden
02-06-2005, 05:02 PM
Meaning that you already had it installed (or tried to install before). If those tables are still empty, just drop them before you run installation.

adrianna
02-06-2005, 11:37 PM
However, if I drop all of those tables, I receive this message when I try to reinstall:

Database error in vBulletin 3.0.6:

Invalid SQL: ALTER TABLE `user`
ADD `rpgclass` int(3) NOT NULL,
ADD `rpgrace` int(3) NOT NULL,
ADD `alignment` int(3) NOT NULL,
ADD `rpgtype` int(3) NOT NULL,
ADD `rpggender` int(3) NOT NULL,
ADD `hp` int(6) NOT NULL default '0',
ADD `maxhp` int(6) NOT NULL default '0',
ADD `ma` int(6) NOT NULL default '0',
ADD `maxma` int(6) NOT NULL default '0',
ADD `pp` int(6) NOT NULL default '0',
ADD `maxpp` int(6) NOT NULL default '0',
ADD `ap` int(6) NOT NULL default '0',
ADD `element` int(3) NOT NULL default '0',
ADD `inbattle` int(3) NOT NULL default '0',
ADD `xp` int(11) NOT NULL default '0',
ADD `clan` smallint(5) NOT NULL default '0',
ADD `rpgstats` char(1) NOT NULL default '1';
mysql error: Duplicate column name 'rpgclass'

mysql error number: 1060

Now I know that if I drop the "user" table, the forums will crash!

Zachery
02-06-2005, 11:42 PM
However, if I drop all of those tables, I receive this message when I try to reinstall:

Database error in vBulletin 3.0.6:

Invalid SQL: ALTER TABLE `user`
ADD `rpgclass` int(3) NOT NULL,
ADD `rpgrace` int(3) NOT NULL,
ADD `alignment` int(3) NOT NULL,
ADD `rpgtype` int(3) NOT NULL,
ADD `rpggender` int(3) NOT NULL,
ADD `hp` int(6) NOT NULL default '0',
ADD `maxhp` int(6) NOT NULL default '0',
ADD `ma` int(6) NOT NULL default '0',
ADD `maxma` int(6) NOT NULL default '0',
ADD `pp` int(6) NOT NULL default '0',
ADD `maxpp` int(6) NOT NULL default '0',
ADD `ap` int(6) NOT NULL default '0',
ADD `element` int(3) NOT NULL default '0',
ADD `inbattle` int(3) NOT NULL default '0',
ADD `xp` int(11) NOT NULL default '0',
ADD `clan` smallint(5) NOT NULL default '0',
ADD `rpgstats` char(1) NOT NULL default '1';
mysql error: Duplicate column name 'rpgclass'

mysql error number: 1060

Now I know that if I drop the "user" table, the forums will crash!
You droped the tables, but you did not remove the fields from the user table.

adrianna
02-07-2005, 02:00 AM
You droped the tables, but you did not remove the fields from the user table.

*sigh* Even after dropping those tables again, and removing the values from the "user" table, it still will not fully install.

By the way, I am running vBulletin 3.0.6

Marco van Herwaarden
02-07-2005, 04:31 AM
You must not only remove the values from the user tanle, but drop the columns.

Revan
02-07-2005, 06:52 AM
Yes, you have to manually enter phpMyAdmin and drop those columns, and every other RPG table, then run the installer once again.
Alternatively, you can add a line of code before and after all the table queries:
Add BEFORE all $DB_site->query:
$DB_site->reporterror = 0;
Add AFTER all $DB_site->query:
$DB_site->reporterror = 1;

Then you can install fine without errors, it will install without stopping with an error.

The v3 installer will be able to run this "repair mode" as well, so all such errors will be history once I complete it :)

adrianna
02-07-2005, 03:17 PM
So do you place those lines before and after each and every "$DB_site->query", or just one before the first one and one after the last one?

Because that would be a lot of lines to insert if it was for each of those lines.

Revan
02-07-2005, 04:46 PM
Sorry I meant before the first one and after the last one. :angel: