MySQL R7 Help [rep +] - 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: MySQL R7 Help [rep +] (
/showthread.php?tid=488321)
MySQL R7 Help [rep +] -
AntonioCroatia - 17.01.2014
Hi, I have this code:
Код:
...
format(ELinija, sizeof(ELinija), "INSERT INTO cmds VALUES ('%i:%i/%i.%i.%i', '/givecash', '%s', '%i', '%s')", sat, minuta, dan, mjesec, godina, APlayerData[playerid][PlayerName], Money, OtherName);
mysql_query(ELinija);
I want to convert it to R7 code, coz my host is now Linux, and it have some bugs wit R5 and R7 MySQL plugin.
Re: MySQL R7 Help [rep +] -
IPrototypeI - 17.01.2014
Quote:
Originally Posted by AntonioCroatia
Hi, I have this code:
Код:
...
format(ELinija, sizeof(ELinija), "INSERT INTO cmds VALUES ('%i:%i/%i.%i.%i', '/givecash', '%s', '%i', '%s')", sat, minuta, dan, mjesec, godina, APlayerData[playerid][PlayerName], Money, OtherName);
mysql_query(ELinija);
I want to convert it to R7 code, coz my host is now Linux, and it have some bugs wit R5 and R7 MySQL plugin.
|
if you use R7 then you can upgrade to r34 or r35.
download:
https://github.com/pBlueG/SA-MP-MySQL/releases
You can use then mysql_tquery or mysql_query. In the R7 Version there is only the function mysql_function_query and there `re a lot of bugs which are fixed in the newer versions.
A little Tip you can set the attribut of your column where you save the date to the date and then you can use the sql-command NOW(). And your INSERT-command is wrong.
Syntax:
Код:
INSERT INTO table (column1,column2...) VALUES (value1,value2 ...);