I tried editing the settings for Update Frequency and Old Messages in Chat and received this error:

user warning: 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 'WHERE nid = 35' at line 8 query: UPDATE chatroom SET poll_freq = 10000, idle_freq = 60000, old_msg_count = 10, kicked_out_message = '', banned_message = '', WHERE nid = 35 in /home3/sites/all/modules/chatroom/chatroom.module on line 157.

The settings I changed also did not take.

CommentFileSizeAuthor
#7 328089.patch379 bytesPaul Natsuo Kishimoto
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pbc’s picture

if i understand it right, there are excessive commas in chatroom.module, function chatroom_update, at the end of lines 148 and 156.
when i removed them, the update in table chatroom succeeded.

(however, when re-entering the edit panel to check the freshly entered values, the kicked out message and banned message are not displayed. so my answer provokes another question ;-)

Babalu’s picture

i have the same error

miahawk’s picture

I do as well, running drupal 6.6 on php 5.2.

korvus’s picture

Same here with Drupal 6.8. The error is actually just an extra comma on line 148 (before the "WHERE" on the next line). The comma on 157 is just a style thing (and I believe should be there, according to Drupal coding standards).

CKIDOW’s picture

Same problem here :O

Max_Headroom’s picture

Confirm. #4 sorts out the problem.

Paul Natsuo Kishimoto’s picture

Assigned: Unassigned » Paul Natsuo Kishimoto
Status: Active » Reviewed & tested by the community
FileSize
379 bytes

An actual patch! Originally posted to #335713: user warning on update...

neofutur’s picture

I confirm this patch is ok ( removing the last comma )

Anonymous’s picture

Version: 6.x-1.0-beta2 » 6.x-2.x-dev
Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

does this apply to the 6.x-2 branch?

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)
sachinrastogi’s picture

Status: Closed (fixed) » Active

hi any one please resolve one query related to SQL

If i have a table with 3 column Like (Name, Age, DepID) and there values are
Dan 20 1
Dan 20 1
Dan 20 2
Dan 20 1
Chal 20 10
Chal 20 10
Dan 20 1
Tan 20 2
Dan 20 1

I want to get distinct record with there RowID how i m getting