Convert easymysql to MYSQL
#1

Title, does anyone have any idea how to convert easymysql to MYSQL?
Reply
#2

why would you do that?

https://sampforum.blast.hk/showthread.php?tid=590310
Reply
#3

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
Well there are too many functions with mysql i don't know the functions of easymysql so.
Reply
#4

here is my example on gamemodeinit

Код:
public OnGameModeInit()
{
	mysql_log(ERROR | WARNING | INFO | DEBUG);

	option_Id = mysql_init_options();
	mysql_set_option(option_Id, AUTO_RECONNECT, true);
	
	g_Handle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, option_Id);
	
	if(g_Handle == MYSQL_INVALID_HANDLE || mysql_errno(g_Handle) != 0)
	{
	    print(MYSQL_FAILURE);
	    SendRconCommand("exit");
	}
	else
	{
	    print(MYSQL_SUCCESS);
	}
	
	new Query[1024];
	mysql_format(g_Handle, Query, sizeof(Query), "CREATE TABLE IF NOT EXISTS `Accounts` (\
		`ID` int(11) NOT NULL AUTO_INCREMENT, \
		`Name` varchar(24) NOT NULL, \
		`Password` varchar(129) NOT NULL, \
		`Ip` varchar(18) NOT NULL, \
		`Level` int(11) NOT NULL, \
		`Money` int(11) NOT NULL, \
		`Kills` int(11) NOT NULL, \
		`Deaths` int(11) NOT NULL, \
		`Scuicides` int(11) NOT NULL, \
		`Skin` int(11) NOT NULL, \
		`Interior` int(11) NOT NULL, \
		`X` float NOT NULL, \
		`Y` float NOT NULL, \
		`Z` float NOT NULL, \
		PRIMARY KEY (`ID`))");
	mysql_tquery(g_Handle, Query);
	
	SetGameModeText(GAMEMODE_TEXT);
	return 1;
}
edit: i use R41-4

https://github.com/pBlueG/SA-MP-MySQL/releases
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)