Problems with mysql table column
2 Attachment(s)
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:
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);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); |
Re: Problems with mysql table column
Show the SQL. Query of creating the table.
|
Re: Problems with mysql table column
Quote:
HTML Code:
query = SQL_PrepareQuery(link, |
Re: Problems with mysql table column
Try with 'now()' on the exact place where is 'null' inserted
|
Re: Problems with mysql table column
Quote:
I also tried setting directly the value with a timestring. HTML Code:
formatex(gszQuery, charsmax(gszQuery), "INSERT INTO `results` VALUES (%d, %d, 0, 1, 0, 0,'2029-01-01 23:59:59')", giPid[id], gMid); |
| All times are GMT -4. The time now is 17:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.