我用的是phpBB2 BS 2.0
外掛名稱: i-Stock Market
外掛版本: 0.80
要如何加入下面綠色的部分的SQL程式碼
我到phpmyadmin內屬資料庫(phpBB2 BS 2.0)內的SQL空白框內加入貼上綠色的部分的程式碼著樣對嗎? 謝謝!!
在資料庫 phpBB2BS 執行以下指令 [說明文件] :
-----------------------------------------------------------
( 空白框 )
我著樣貼會產生錯誤,
資料庫 forum 在 localhost 執行
錯誤
SQL 語法 :
CREATE TABLE phpbb_bank(
account_id mediumint( 8 ) NOT NULL default '0',
cash mediumint( 8 ) NOT NULL default '0',
gold mediumint( 8 ) NOT NULL default '0',
loan mediumint( 8 ) NOT NULL default '0',
loan_time varchar( 255 ) NOT NULL default '',
save_time varchar( 255 ) NOT NULL default '',
PRIMARY KEY ( account_id )
) TYPE = MYISAM
MySQL 傳回:
Table 'phpbb_bank' already exists
回上一頁
#
#-----[ SQL ]--------------------------------------------
#
CREATE TABLE phpbb_stock_config (
config_name varchar(255) NOT NULL default '',
config_value varchar(255) NOT NULL default '',
PRIMARY KEY (config_name)
) TYPE=MyISAM;
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('last_update', '1101122253');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('update_time', '100');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('min_affort', '1');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('max_affort', '5');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('updated_times', '0');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('stockmarket_name', 'Stock Market');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('stop_rate', '20');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('down_color', 'FF0000');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('up_color', '009900');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('last_update_day', '1101081600');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('last_stock_value', '507');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('stop_time', '86400');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('stock_fee_rate', '10');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('stock_volume_news', '100');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('loan_rate', '35');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('save_rate', '2');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('loan_rate_time', '604800');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('save_rate_time', '302400');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('bank_cash', '0');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('gold_value', '4000');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('company_start_value', '300000');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('min_company_value', '40');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('company_low_value', '20');
INSERT INTO phpbb_stock_config (config_name, config_value) VALUES ('incash_value', '10000');
CREATE TABLE phpbb_companies (
company_id mediumint(8) NOT NULL auto_increment,
company_value mediumint(8) NOT NULL default '0',
company_start_value mediumint(8) NOT NULL default '0',
company_sold mediumint(8) NOT NULL default '0',
company_bought mediumint(8) NOT NULL default '0',
company_hold mediumint(8) NOT NULL default '0',
company_cash mediumint(8) NOT NULL default '0',
company_min_value mediumint(8) NOT NULL default '0',
company_max_value mediumint(8) NOT NULL default '0',
company_img varchar(255) NOT NULL default '',
company_name varchar(255) NOT NULL default '',
company_master mediumint(8) NOT NULL default '0',
company_status mediumint(8) NOT NULL default '0',
company_description text NOT NULL,
company_stop_time varchar(255) NOT NULL default '0',
PRIMARY KEY (company_id)
) TYPE=MyISAM;
INSERT INTO phpbb_companies (company_id, company_value, company_start_value, company_sold, company_bought, company_hold, company_cash, company_min_value, company_max_value, company_img, company_name, company_master, company_status, company_description, company_stop_time) VALUES (1, 40, 40, 0, 0, 20000, 300000, 40, 40, '', 'iOptional Company', 2, 0, 'This is a test company of stock market in i-StockMarket MOD!', '0');
CREATE TABLE phpbb_bank (
account_id mediumint(8) NOT NULL default '0',
cash mediumint(8) NOT NULL default '0',
gold mediumint(8) NOT NULL default '0',
loan mediumint(8) NOT NULL default '0',
loan_time varchar(255) NOT NULL default '',
save_time varchar(255) NOT NULL default '',
PRIMARY KEY (account_id)
) TYPE=MyISAM;
CREATE TABLE phpbb_stock_news (
news_id mediumint(8) NOT NULL auto_increment,
news_content varchar(255) NOT NULL default '',
news_time varchar(255) NOT NULL default '',
PRIMARY KEY (news_id)
) TYPE=MyISAM;
CREATE TABLE phpbb_exchange (
exchange_id mediumint(8) NOT NULL auto_increment,
user_id mediumint(8) NOT NULL default '0',
stock_id mediumint(8) NOT NULL default '0',
total_stock mediumint(8) NOT NULL default '0',
PRIMARY KEY (exchange_id)
) TYPE=MyISAM;
ALTER TABLE phpbb_users ADD user_stock_bought int(11) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_users ADD user_stock_sold int(11) DEFAULT '0' NOT NULL;
[問題] 虛擬股市'SQL
版主: 版主管理群

