MySQL INSERT issue
#1

Hi all,

I have a strange issue with my script. It's to do with logging chatlog with MySQL.

When the the script tries to execute the following MySQL statement:

Код:
INSERT INTO `chat_log`(`id`, `character_id`, `text`, `unix_timestamp`) VALUES (NULL,1,'Joe Bloggs: Test',1467728625);
INSERT INTO `chat_log`(`id`, `character_id`, `text`, `unix_timestamp`) VALUES (NULL,1,'Joe Bloggs: Test',1467728625);
INSERT INTO `chat_log`(`id`, `character_id`, `text`, `unix_timestamp`) VALUES (NULL,1,'Joe Bloggs: Test',1467728625);
INSERT INTO `chat_log`(`id`, `character_id`, `text`, `unix_timestamp`) VALUES (NULL,1,'Joe Bloggs: Test',1467728625);
INSERT INTO `chat_log`(`id`, `character_id`, `text`, `unix_timestamp`) VALUES (NULL,1,'Joe Bloggs: Test',1467728625);
It does not insert and gives the following error in the MySQL log:
Код:
[15:23:52] [DEBUG] mysql_tquery - connection: 1, query: " INSERT INTO `chat_log`(`id`, `character_id`, `text`, `unix_time", callback: "(null)", format: "(null)"
[15:23:52] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[15:23:52] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `chat_log`(`id`, `character_id`, `text`, `unix_timestamp`) VALUES (N' at line 1
[15:23:52] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
However, if I take those MySQl statement as they are there as I've posted, and try to insert them using phpmyadmin, they insert absolutely fine and pop up with 0 errors.

Any ideas?
Reply


Messages In This Thread
MySQL INSERT issue - by Jonesy96 - 05.07.2016, 14:40
Re: MySQL INSERT issue - by Vince - 05.07.2016, 14:56
Re: MySQL INSERT issue - by Napst34 - 05.07.2016, 19:35
Re: MySQL INSERT issue - by Rdx - 06.07.2016, 08:43

Forum Jump:


Users browsing this thread: 1 Guest(s)