29.09.2011, 17:28
Well I can't connect to my host.
Is something wrong?
Is something wrong?
Код:
#define mysql_host "s1.hostingtime.de"//the IP of the host, should be displayed when created a database #define mysql_user "db223"//database username #define mysql_password "secret :D"//database password #define mysql_database "db223"//database name
Код:
public OnFilterScriptInit() { print("DutchAdmin System has loaded!"); mysql_debug(1); for(new x = 0; x < 3; x++) { mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password); if(mysql_ping() == -1) printf("MySQL connection attempt %d failed!", x); else { print("succes"); break; } } format(Query,sizeof(Query), "CREATE TABLE IF NOT EXISTS `Users` ("\ "`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,"\ "`Viplevel` int(15) NULL,"\ "`Adminlevel` int(15) NULL,"\ "`Banned` int(15) NULL,"\ "PRIMARY KEY (`Username`)"\ ); mysql_query(Query); mysql_free_result(); return 1; }