ekzmer
28-Mar-2007, 07:58 AM
<code>
$sql[] = "
CREATE TABLE " . $accessname . "_bank (
id int UNSIGNED NOT NULL auto_increment,
user_id int(10) NOT NULL,
holding int(14) UNSIGNED default '0',
totalwithdrew int(14) UNSIGNED default '0',
totaldeposit int(14) UNSIGNED default '0',
opentime int(10) UNSIGNED NOT NULL,
fees char(5) NOT NULL DEFAULT 'on',
PRIMARY KEY (user_id),
INDEX (id)
);";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankinterest', '2');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankfees', '2');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankpayouttime', '84600');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankname', 'Forums Bank');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankopened', 'off');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankholdings', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('banktotaldeposits', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('banktotalwithdrew', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('banklastrestocked', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bank_minwithdraw', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bank_mindeposit', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bank_interestcut', '0');";</code>
can any one can correct this sql ? im getting database error , this sql is for bank modification
$sql[] = "
CREATE TABLE " . $accessname . "_bank (
id int UNSIGNED NOT NULL auto_increment,
user_id int(10) NOT NULL,
holding int(14) UNSIGNED default '0',
totalwithdrew int(14) UNSIGNED default '0',
totaldeposit int(14) UNSIGNED default '0',
opentime int(10) UNSIGNED NOT NULL,
fees char(5) NOT NULL DEFAULT 'on',
PRIMARY KEY (user_id),
INDEX (id)
);";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankinterest', '2');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankfees', '2');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankpayouttime', '84600');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankname', 'Forums Bank');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankopened', 'off');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bankholdings', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('banktotaldeposits', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('banktotalwithdrew', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('banklastrestocked', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bank_minwithdraw', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bank_mindeposit', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('bank_interestcut', '0');";</code>
can any one can correct this sql ? im getting database error , this sql is for bank modification