25.09.2011, 18:02
pawn Код:
public OnFilterScriptInit()
{
mysql_debug(1);
mysql_connect(mysql_host,mysql_user,mysql_database,mysql_password);
mysql_query(
"CREATE TABLE IF NOT EXISTS `Accounts` ("\
"`AccID` int(10) NOT NULL AUTO_INCREMENT,"\
"`Username` varchar(24) NOT NULL,"\
"`Password` varchar(64) NOT NULL,"\
"`IP` varchar(16) NULL,"\
"`Money` int(15) NULL,"\
"`Score` int(15) NULL,"\
"`Kills` int(15) NULL,"\
"`Deaths` int(15) NULL,"\
"`Donator` int(15) NULL,"\
"`Admin` int(15) NULL,"\
"`Plantedbombs` int(15) NULL,"\
"`Defusedbombs` int(15) NULL,"\
"`Banned` int(15) NULL,"\
"`Pending` int(15) NULL,"\
"PRIMARY KEY (`AccID`)"\
") ENGINE=InnoDB DEFAULT CHARSET=latin1;");
if(mysql_ping() > -1) return print("MySQL connection to database succeeded!");
else print("MySQL connection to database failed. Please check your database settings!");
return 1;
}