MySQL R7 from MySQL R6/R5
#1

I recently converted over from R5/R6 to R7, and i immediately noticed i can no longer use mysql_query ( Makes me sound newbie, but oh well. I'm here to learn. )

Now; I'm a tad confusing on what to convert mysql_query to, and how i will do it; So ill post some scripts hoping you guys can take a look at it see and help me out.

Код:
public OnGameModeInit()
{
	SetGameModeText(REVISION);
 	mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
    mysql_function_query(dbHandle,"CREATE TABLE IF NOT EXISTS playerdata(user VARCHAR(24), password VARCHAR(41), level INT(20), money INT(20), IP VARCHAR(16), admin INT(20), bank INT(20))");
    UsePlayerPedAnims();
    mysql_debug(1);
    DisableInteriorEnterExits();
	return 1;
}
Код:
    format(query, sizeof(query), "SELECT IP FROM `playerdata` WHERE user = '%s' LIMIT 1", pname); 
    mysql_query(query);
Thank's for the help.
Reply
#2

There is a section in the tutorial from the following link about converting to use threaded queries. You can't use the old method with R7, all queries must be threaded.

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

Quote:
Originally Posted by iggy1
Посмотреть сообщение
There is a section in the tutorial from the following link about converting to use threaded queries. You can't use the old method with R7, all queries must be threaded.

https://sampforum.blast.hk/showthread.php?tid=337810
wtf.. that sucks man.. i liked the old style better is it just me? everyone used to mysql_query imo
i dont like learning new stuff about something i already know :P
Reply
#4

I feel the opposite, when new tech comes out you should try to use it. The performance benefit from threaded queries is enough to make me want to use them.

Your not learning new stuff you already know, your learning new stuff you didn't/don't know
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)