Hello,
i got a small issue with a plugin.
The plugin works fine but it throws the following error all the time in the server console:
Quote:
07/08/2020 - 16:29:47: [deathrun_stats.amxx] SQL error: Incorrect datetime value: '' for column 'recorddate' at row 1
|
when I look into the specific table there is indeed in some rows a NULL value in the 'recorddate' column.
And when I look into the sql statements I see the following insert statment that made me suspicious:
HTML Code:
formatex(gszQuery, charsmax(gszQuery), "INSERT INTO `results` VALUES (%d, %d, 0, 1, 0, 0, NULL)", giPid[id], gMid);
as you might see the last parameter in the insert is the column with the datetime value NULL.
My question is, how do I get the current time in the datetime format and insert it here instead of NULL.
Hope someone can help me out. Thx.
UPDATE:
TLTR; I compiled with the old Init.inl file.
So the solution is to update the following line in the Init.inl insert statement and recompile with the updated Init.inl file.
Code:
formatex(gszQuery, charsmax(gszQuery), "INSERT INTO `results` VALUES (%d, %d, 0, 1, 0, 0, now())", giPid[id], gMid);