vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   [HELP] Reimported users table, now getting database error for arcade (https://vborg.vbsupport.ru/showthread.php?t=228690)

blh654 11-23-2009 05:26 PM

[HELP] Reimported users table, now getting database error for arcade
 
Hi, I had to reimport my users table because of an error I made. It was before I installed the arcade.

After the import, I get this error from the arcade page when trying to access it:
Quote:

mySQL query error: SELECT userid, username, posts, arcade_ban, times_played, is_arcade_mod AS is_mod,
fav_games AS favs, user_sort, user_order, user_g_pp, user_s_pp, def_g_cat,
game_skin, arcade_mod_privs, arcade_pmactive,
usergroupid, membergroupids
FROM user
WHERE userid=1


mySQL error: Unknown column 'arcade_ban' in 'field list'
Obviously this is because the arcade tables aren't in the database - so how do I recreate them? I don't want to re-install my arcade because I have a lot of games/categories installed, and I don't want to lose them.

Also, I have vbPlaza installed too - will this be affected by the arcade errors?

kh99 11-23-2009 06:49 PM

Looking at the install code in the product xml file, I found the following additions are made to the user table (assuming you had the latest version installed):

Code:

$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_ban tinyint(1) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD times_played int(11) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD is_arcade_mod TINYINT( 1 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD fav_games TEXT NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD user_sort VARCHAR( 15 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD user_order VARCHAR( 4 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD user_g_pp MEDIUMINT( 8 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD user_s_pp MEDIUMINT( 8 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD def_g_cat MEDIUMINT( 8 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD game_skin TINYINT( 1 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_mod_privs TEXT NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_pmactive tinyint(1) DEFAULT '1' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD games_played int(11) NOT NULL default '0'");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD time_played int(11) NOT NULL default '0'");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_points int(11) NOT NULL default '500', ADD arcade_spent int(11) NOT NULL default '0', ADD arcade_won int(11) NOT NULL default '0', ADD arcade_high int(11) NOT NULL default '0'");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD create_tourney tinyint(1) NOT NULL default '1'");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_sess_gid MEDIUMINT(8) NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_sess_start INT(11) NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_gtype INT(11) NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_session MEDIUMINT(8) NOT NULL");


so you could probably either find a way to execute that or else you could edit it into SQL queries pretty easily. Obviously all the data in those fields is gone.

I don't know whether or not that will fix everything, but it may be worth a shot.

blh654 11-23-2009 08:10 PM

Hallelujah! It worked out like a charm (had to modify each query to run, but it was worth it!)

Thanks KH99!


All times are GMT. The time now is 04:59 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.01873 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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