The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Installation Tables and Columns Help...
Okay, lets say I have a mod... and in version1, I have the following install code... (the code is an example, I know its not functioning, but thats got nothing to do with my problem)
Code:
$db->query_write("CREATE TABLE IF NOT EXISTS table ( column1 int auto_increment, column2 int, PRIMARY KEY (column1) )"); Then I create a version2, with an extra column... so I made my install code this... Code:
$db->query_write("CREATE TABLE IF NOT EXISTS table ( column1 int auto_increment, column2 int, column3 int, PRIMARY KEY (column1) )"); $db->query_write("ALTER TABLE table ADD COLUMN column3 int)"); Now I am making a version 3... and there is yet another column to add... I tried the following code, but I got an error when it hit the ADD COLUMN column3 code... because column3 already exists. Code:
$db->query_write(" CREATE TABLE IF NOT EXISTS table ( column1 int auto_increment, column2 int, column3 int, column4 int, PRIMARY KEY (column1) )"); $db->query_write("ALTER TABLE table ADD COLUMN column3 int)"); $db->query_write("ALTER TABLE table ADD COLUMN column4 int)"); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|