SA-MP Forums Archive
How to connect mysql? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to connect mysql? (/showthread.php?tid=648772)



How to connect mysql? - Longover - 28.01.2018

I'm have this line for connect mysql:
Код:
   DB_Connect = mysql_connect(SQL_Host, SQL_User, SQL_Pass, SQL_DB);
I'm definited DB_Connect
The SQL_Host.SQL_user,etc... is:
Код:
#define localhost true
#if localhost == true
#define SQL_Host    	"localhost"
#define SQL_User    	"root"
#define SQL_DB      	"tbr"
#define SQL_Pass    	""
#else
#define SQL_Host    	"127.0.0.1"
#define SQL_User    	"server_472"
#define SQL_DB      	"server_472_mata"
#define SQL_Pass    	"07062003"
#endif
And my error is:
Код:
C:\Users\Sorin\Desktop\Gamemode De La 0\gamemodes\Kernel.pwn(243) : warning 213: tag mismatch
This Line:
Код:
DB_Connect = mysql_connect(SQL_Host, SQL_User, SQL_Pass, SQL_DB);
Please help!

EDIT: I'm have on gamemodeexit:
Код:
mysql_close(DB_Connect);
And in this line i'm have tag mismach error.


Re: How to connect mysql? - Flamehaze7 - 28.01.2018

https://sampforum.blast.hk/showthread.php?tid=627520


Re: How to connect mysql? - MBJ - 28.01.2018

PHP код:
new MySQL:DB_Connect



Re: How to connect mysql? - Mugala - 29.01.2018

you can use this link > https://sampwiki.blast.hk/wiki/MySQL_Plugin#mysql_connect