vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   changing MYSQL table column names (https://vborg.vbsupport.ru/showthread.php?t=156818)

osayidan 09-01-2007 11:52 PM

changing MYSQL table column names
 
Hi
I'm working on integrating a game server with vbulletin, and to do so i will have to change the column names that one of these uses to match the other, I think it would take much longer to modify the game source code for this, so i will go for changing it on vbulletin.

What i need to do is as follows:
change the VB table field "userid" to "account_id"
change the VB table field "username" to "userid"

Obviously, i know how to change the field names in MySQL, what i need help with is a quick and/or efficient and accurate way of changing the vbulletin source to properly use these new field names.

Thanks.

Dismounted 09-02-2007 07:35 AM

Good luck with that. userid and username is used everywhere in the code.

Paul M 09-02-2007 09:12 AM

I wouldn't try that if I were you. You will more than likely break your forum in a big way.

Much easier to add two columns to the user table and either have a plugin that populates them on sign-up, or a cron job that periodically replicates the values across.

Marco van Herwaarden 09-02-2007 10:00 AM

If you are using MySQL 5, then you might also be able to create a VIEW on the user table with different column names.

osayidan 09-03-2007 03:42 PM

Got it working by changing a few things in the game source code, turns out i didn't even have to touch vbulletin.
Thanks for the advice though.


All times are GMT. The time now is 07:55 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.00918 seconds
  • Memory Usage 1,711KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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