SA-MP Forums Archive
Problem with saving chatlogs in 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: Problem with saving chatlogs in MySQL (/showthread.php?tid=662387)



Problem with saving chatlogs in MySQL - Stefhan - 30.12.2018

This is what happens at OnPlayerText:

Код:
    static query[168 + 50];
    format(query, sizeof(query), "INSERT INTO chatlogs(acc_dbid, acc_name, playerid, time, text) VALUES('%i', '%e', '%i', UTC_TIMESTAMP(), '%e')", PlayerInfo[playerid][pDBID], ReturnName(playerid), playerid, text);
    mysql_tquery(g_SQL, query);
this is what happens in the database:



The only working lines are the database ID and the time. What did I do wrong here? I can't see it.


Re: Problem with saving chatlogs in MySQL - Calisthenics - 30.12.2018

%e only works with `mysql_format` function.


Re: Problem with saving chatlogs in MySQL - Stefhan - 30.12.2018

Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
%e only works with `mysql_format` function.
Cheers mate!