Рекомендованные сообщения



Не найдено.

2 posts in this topic

Сделал логи для сервера, но в БД не идет, пишет ошибку #1064 (MySQL), почитал на других форумах, там написано что из за размера, но с размером все хорошо.

 

Спойлер

[19:56:50] [plugins/mysql] error #1064 while executing query "INSERT INTO `logs` (`date`, `time`, `playersender` `playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:50', 'Test_Test', 'Test_Test', 'Создал деньги игроку', '9999')": 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 '`playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:50', 'Test_T' at line 1
[19:56:51] [plugins/mysql] error #1064 while executing query "INSERT INTO `logs` (`date`, `time`, `playersender` `playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:51', 'Test_Test', 'Test_Test', 'Создал деньги игроку', '999')": 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 '`playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:51', 'Test_T' at line 1
[19:56:52] [plugins/mysql] error #1064 while executing query "INSERT INTO `logs` (`date`, `time`, `playersender` `playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:52', 'Test_Test', 'Test_Test', 'Создал деньги игроку', '9999')": 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 '`playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:52', 'Test_T' at line 1
[19:56:52] [plugins/mysql] error #1064 while executing query "INSERT INTO `logs` (`date`, `time`, `playersender` `playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:52', 'Test_Test', 'Test_Test', 'Создал деньги игроку', '9999')": 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 '`playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:52', 'Test_T' at line 1
[19:56:53] [plugins/mysql] error #1064 while executing query "INSERT INTO `logs` (`date`, `time`, `playersender` `playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:53', 'Test_Test', 'Test_Test', 'Создал деньги игроку', '9999')": 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 '`playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:53', 'Test_T' at line 1
[19:56:53] [plugins/mysql] error #1064 while executing query "INSERT INTO `logs` (`date`, `time`, `playersender` `playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:53', 'Test_Test', 'Test_Test', 'Создал деньги игроку', '9999')": 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 '`playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:53', 'Test_T' at line 1
[19:56:54] [plugins/mysql] error #1064 while executing query "INSERT INTO `logs` (`date`, `time`, `playersender` `playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:54', 'Test_Test', 'Test_Test', 'Создал деньги игроку', '9999')": 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 '`playeraddressee`, `action`, `sum`) VALUES ('15.09.2020', '19:56:54', 'Test_T' at line 1

 

 

 

Спойлер

CMD:givemoney(playerid, params[])
{
	new giveid, money, string[54+MAX_PLAYER_NAME*2+3*2+20], log[11+6+32*2+512*2], hour, minute, second, vr[555], year, month, day, dt[555];
	if(PlayerInfo[playerid][pAdmin] < 8) return 1;
	if(!IsPlayerConnected(giveid)) return SendClientMessage(playerid, -1 ,PlayerOff);
	if(sscanf(params,"dd", giveid ,money)) return SendClientMessage(playerid, -1, "Используйте: /givemoney [Ид] [Сумма]");

    PlayerInfo[playerid][pMoney] += money;
    
	gettime(hour, minute, second);
	format(vr, sizeof(vr), "%02d:%02d:%d", hour, minute, second);
	getdate(year, month, day);
	format(dt, sizeof(dt), "%02d.%02d.%02d", day, month, year);

	format(log, sizeof(log), "INSERT INTO `logs` (`date`, `time`, `playersender` `playeraddressee`, `action`, `sum`) VALUES ('%s', '%s', '%s', '%s', 'Создал деньги игроку', '%d')", dt, vr, PlayerInfo[playerid][pName], PlayerInfo[giveid][pName], money);
	mysql_query(dbHandle, log);
	return 1;
}

 

 

 

P/s: В таблицу тоже ничего не записывается

Share this post


Link to post
Share on other sites
1 час назад, Гость Андрей сказал:

`playersender` `playeraddressee`

между этими двумя заголовками не хватает запятой, а в целом эта ошибка возникает, если есть синтаксические ошибки в запросе. Таковой ошибкой и является пропущенная запятая. 

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   You have pasted content with formatting.   Remove formatting

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

Loading...
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • NNN
      By NNN
      Поставил эту http://pawno-rus.ru/topic/1034-sistema-reporta/ систему репорта со всеми доработками, в компиляторе высвечиваются эти ошибки:
      loose indentation error 017: undefined symbol "AddMessage" warning 215: expression has no effect error 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line первое предупреждение из за корявости скрипта (loose indentation) а вот с остальными не знаю)