[INFO]System Registration based mysql
#1

I'm doing a register system with mysql, and right up to here? I have to connect the database

Code:
//=======[ FS ]=================================================================
#define FILTERSCRIPT
//=======[ INCLUDE ]============================================================
#include <a_samp>
#include <a_mysql>
//=======[ MYSQL-S ]============================================================
#define SQL_HOST "this is a host"
#define SQL_USER "this is a user"
#define SQL_PASS "this is a password"
#define SQL_DB   "this is a database"
//=======[ FS-S ]===============================================================
#define NAMEFS     "system mysql"
#define UPDATEFS   "00/00/0000"
#define VERSIONFS "v0.1"
#define LINEFS    "00000"
//=======[ ONFILTERSCRIPTINIT ]=================================================
public OnFilterScriptInit()
{
    mysql_debug(1);

    print ( "\n[===========================================]");
    printf( " %s", NAMEFS);
    printf( " Date Update: %s", UPDATEFS);
    printf( " Version: %s", VERSIONFS);
    printf( " Line FS: %s", LINEFS);
	print ( " Start FilterScript");
    print ( "[===========================================]\n");

    mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
	if(mysql_ping()>=1)
	{
	    print(" [MySQL]: Connected succefully");

	}
	else
	{
	    print(" [MySQL]: Disconnected succefully");
	    SendRconCommand("exit");
	}
	return 1;
}
//=======[ ONFILTERSCRIPTEXIT ]=================================================
public OnFilterScriptExit()
{
    print ( "\n[===========================================]");
    printf( " %s", NAMEFS);
    printf( " Date Update: %s", UPDATEFS);
    printf( " Version: %s", VERSIONFS);
    printf( " Line FS: %s", LINEFS);
    print ( " Stop FilterScript");
    print ( "[===========================================]\n");

    mysql_close();
	return 1;
}
//=======[ END FS ]============================================================
Reply


Messages In This Thread
[INFO]System Registration based mysql - by TheBluec0de - 30.09.2011, 17:28
Re: [INFO]System Registration based mysql - by [MWR]Blood - 30.09.2011, 17:29
Re: [INFO]System Registration based mysql - by TheBluec0de - 30.09.2011, 17:32
Re: [INFO]System Registration based mysql - by TheBluec0de - 30.09.2011, 17:44
Re: [INFO]System Registration based mysql - by CJ101 - 30.09.2011, 17:48
Re: [INFO]System Registration based mysql - by TheBluec0de - 30.09.2011, 17:50
Re: [INFO]System Registration based mysql - by Kingunit - 30.09.2011, 17:55

Forum Jump:


Users browsing this thread: 3 Guest(s)