PDA

View Full Version : is this sql is correct ?


ekzmer
03-28-2007, 02: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

Derek
03-28-2007, 07:06 AM
Yes, it looks right...

Maneel
03-28-2007, 12:21 PM
Bank doesnt works for NBSDEsignz script .

I tested it long time ago , but you can give a try and tell me if its working

ekzmer
03-29-2007, 10:27 AM
maybe there is another way to the sql of the bank ?