vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   RPG Integration Hack (https://vborg.vbsupport.ru/forumdisplay.php?f=102)
-   -   Invalid SQL: CREATE TABLE at installation. (https://vborg.vbsupport.ru/showthread.php?t=75841)

adrianna 02-06-2005 04:24 PM

Invalid SQL: CREATE TABLE at installation.
 
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

Quote:

Originally Posted by adrianna
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

Quote:

Originally Posted by Zachery
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:
PHP Code:

$DB_site->reporterror 0

Add AFTER all $DB_site->query:
PHP Code:

$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:


All times are GMT. The time now is 06:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01523 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete