SA-MP Forums Archive
[help] Stock - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [help] Stock (/showthread.php?tid=256204)



[help] Stock - mariomako - 19.05.2011

I has script my stock

pawn Код:
stock Log(command[], action[])
{
    new Query[200];
    mysql_real_escape_string(action, action);
    format(Query, sizeof Query, "INSERT INTO `logs` (`Event`, `Details`) VALUES ('%s', '%s')", command, action);
    mysql_query(Query);
}
example how use:

Код:
Log("MakeAdmin", string);
What is wrong? I dont have informations in mysql database !


Re: [help] Stock - Raimis_R - 19.05.2011

Check mysql_log.


Re: [help] Stock - mariomako - 19.05.2011

Quote:
Originally Posted by Raimis_R
Посмотреть сообщение
Check mysql_log.
[09:04:01] CMySQLHandler::Query(INSERT INTO `logs` (`Event`, `Details`) VALUES ('GMX', 'mariomako performed a server restart.')) - An error has occured. (Error ID: 1054, Unknown column 'Details' in 'field list')


Re: [help] Stock - Raimis_R - 19.05.2011

Create field named "Details".