Version: , by mtha
Developer Last Online: May 2016
Version: Unknown
Rating:
Released: 07-03-2006
Last Update: Never
Installs: 0
No support by the author.
CMX,
I've been looking at your vb Plaza installation code, and wondering why you use alot of seperate queries while you can merge them together? Shouldnt it save queries, and run better/faster in the installation process?
example:
PHP Code:
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN vbbux DECIMAL(30, 5) NOT NULL DEFAULT '0'"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN vbbank DECIMAL(30, 5) NOT NULL DEFAULT '0'"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN vbp_nextbankinterest INT UNSIGNED NOT NULL DEFAULT '0'"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN vbp_lastbirthday INT UNSIGNED NOT NULL DEFAULT '0'"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN vbp_displayflags INT UNSIGNED NOT NULL DEFAULT '0'"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN vbp_otherflags INT UNSIGNED NOT NULL DEFAULT '0'"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN vbp_vbplazaoptions INT UNSIGNED NOT NULL DEFAULT '0'");
why dont use
PHP Code:
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN vbbux DECIMAL(30, 5) NOT NULL DEFAULT '0', ADD COLUMN vbbank DECIMAL(30, 5) NOT NULL DEFAULT '0', ADD COLUMN vbp_nextbankinterest INT UNSIGNED NOT NULL DEFAULT '0', ADD COLUMN vbp_lastbirthday INT UNSIGNED NOT NULL DEFAULT '0', ADD COLUMN vbp_displayflags INT UNSIGNED NOT NULL DEFAULT '0', ADD COLUMN vbp_otherflags INT UNSIGNED NOT NULL DEFAULT '0', ADD COLUMN vbp_vbplazaoptions INT UNSIGNED NOT NULL DEFAULT '0', ...
OR with
PHP Code:
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN vbbux"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN vbbank"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN vbp_nextbankinterest"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN vbp_lastbirthday"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN vbp_displayflags"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN vbp_otherflags");
PHP Code:
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN vbbux, DROP COLUMN vbbank, DROP COLUMN vbp_nextbankinterest, DROP COLUMN vbp_lastbirthday, DROP COLUMN vbp_displayflags, DROP COLUMN vbp_otherflags, ...
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
True, I could probably do all of these, but its a minute point at this time, as I will be working on V2.0 very soon, I will probably incorporate these changes into V2.0