虛擬股市修正

為了增加討論區的活躍,
新增了虛擬股市,
讓小朋友可以在進出虛擬股市時了解商業行為。
安裝時在資料庫更新有一些問題,
要加以修正原始檔方能安裝。


原文在此
仔細比較此外掛關於 ‘資料庫更新’ 的檔案, 可能有部分必須修正.
1. Vault.txt
2. root/vault_db_update.php

以下的修改, 提供您參考:
開啟:

1
vault_db_update.php

尋找:

1
2
3
$sql[] = "INSERT INTO " . $table_prefix . "vault_exchange (stock_id, stock_name, stock_desc, stock_price, stock_previous_price, stock_best_price, stock_worst_price) VALUES (1, 'Vault_action_name_1', 'Vault_action_desc_1', 100, 100, 100, 100)";
$sql[] = "INSERT INTO " . $table_prefix . "vault_exchange (stock_id, stock_name, stock_desc, stock_price, stock_previous_price, stock_best_price, stock_worst_price) VALUES (2, 'Vault_action_name_2', 'Vault_action_desc_2', 200, 200, 200, 200)";
$sql[] = "INSERT INTO " . $table_prefix . "vault_exchange (stock_id, stock_name, stock_desc, stock_price, stock_previous_price, stock_best_price, stock_worst_price) VALUES (3, 'Vault_action_name_3', 'Vault_action_desc_3', 300, 300, 300, 300)";

取代為:

1
2
3
$sql[] = "INSERT INTO " . $table_prefix . "vault_exchange (stock_id, stock_name, stock_desc, stock_price, stock_previous_price, stock_best_price, stock_worst_price, chairman) VALUES (1, 'Vault_action_name_1', 'Vault_action_desc_1', 100, 100, 100, 100, 2)";
$sql[] = "INSERT INTO " . $table_prefix . "vault_exchange (stock_id, stock_name, stock_desc, stock_price, stock_previous_price, stock_best_price, stock_worst_price, chairman) VALUES (2, 'Vault_action_name_2', 'Vault_action_desc_2', 200, 200, 200, 200, 2)";
$sql[] = "INSERT INTO " . $table_prefix . "vault_exchange (stock_id, stock_name, stock_desc, stock_price, stock_previous_price, stock_best_price, stock_worst_price, chairman) VALUES (3, 'Vault_action_name_3', 'Vault_action_desc_3', 300, 300, 300, 300, 2)";

開啟:

1
Vault.txt

尋找:

1
2
3
INSERT INTO phpbb_vault_exchange (stock_id, stock_name, stock_desc, stock_total, stock_price, stock_previous_price, stock_best_price, stock_worst_price) VALUES (1, 'Vault_action_name_1', 'Vault_action_desc_1', 30, 100, 100, 100, 100,2 );
INSERT INTO phpbb_vault_exchange (stock_id, stock_name, stock_desc, stock_total, stock_price, stock_previous_price, stock_best_price, stock_worst_price) VALUES (2, 'Vault_action_name_2', 'Vault_action_desc_2', 30, 200, 200, 200, 200,2 );
INSERT INTO phpbb_vault_exchange (stock_id, stock_name, stock_desc, stock_total, stock_price, stock_previous_price, stock_best_price, stock_worst_price) VALUES (3, 'Vault_action_name_3', 'Vault_action_desc_3', 30, 300, 300, 300, 300,2 );

取代為:

1
2
3
INSERT INTO phpbb_vault_exchange (stock_id, stock_name, stock_desc, stock_total, stock_price, stock_previous_price, stock_best_price, stock_worst_price, chairman) VALUES (1, 'Vault_action_name_1', 'Vault_action_desc_1', 30, 100, 100, 100, 100, 2);
INSERT INTO phpbb_vault_exchange (stock_id, stock_name, stock_desc, stock_total, stock_price, stock_previous_price, stock_best_price, stock_worst_price, chairman) VALUES (2, 'Vault_action_name_2', 'Vault_action_desc_2', 30, 200, 200, 200, 200, 2);
INSERT INTO phpbb_vault_exchange (stock_id, stock_name, stock_desc, stock_total, stock_price, stock_previous_price, stock_best_price, stock_worst_price, chairman) VALUES (3, 'Vault_action_name_3', 'Vault_action_desc_3', 30, 300, 300, 300, 300, 2);

即可以正常安裝。

本篇發表於 PHPBB2。將永久鍊結加入書籤。

發表迴響

您的電子郵件位址並不會被公開。 必要欄位標記為 *

*

您可以使用這些 HTML 標籤與屬性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>