Problem with registration in samp [MySQL]
#6

Код:
public OnFilterScriptInit()
{
	mysql_debug(1);
	print("\n************************************");
	print("BReg - MySQL Registration script by [MWR]Blood - Loaded!");
	print("************************************\n");
	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,"\
			  "PRIMARY KEY (`AccID`)"\
			") ENGINE=InnoDB DEFAULT CHARSET=latin1;");
	if(mysql_ping() > -1) return print("::BReg:: MySQL connection to database succeeded!");

	else print("::BReg:: MySQL connection to database failed. Please check your database settings!");
	return 1;
}
database is created, and the table is created automatically
Reply


Messages In This Thread
Problem with registration in samp [MySQL] - by ALEKS333 - 28.12.2012, 06:59
Re: Problem with registration in samp [MySQL] - by RedCrossER - 28.12.2012, 07:06
Re: Problem with registration in samp [MySQL] - by Yvax - 28.12.2012, 07:09
Re: Problem with registration in samp [MySQL] - by ALEKS333 - 28.12.2012, 07:10
Re: Problem with registration in samp [MySQL] - by Grim_ - 28.12.2012, 07:15
Re: Problem with registration in samp [MySQL] - by ALEKS333 - 28.12.2012, 07:17
Re: Problem with registration in samp [MySQL] - by RedCrossER - 28.12.2012, 07:18

Forum Jump:


Users browsing this thread: 3 Guest(s)