TIP: how I solved query failed / Duplicate entry in comments
Posted: Mon Mar 15, 2010 7:22 pm
Hi,
In the comments module I got the following error:
Hope this helps.
Gregor
In the comments module I got the following error:
What I did to solve it, is I exported the table 'cms_module_comments_seq' to an ASCII-file with all sql-statements. I noticed that there where, in my case, three records, all with a different sequence number. I also noticed that the highest number in that table did not match the highest number of the key in the comments table. So what I did I edited the seq-file, the number in that file, and changed that number to the highest key-number of the comments table. And afterwards I imported the sql-statements into the table. I checked the table and deleted the obsolete records so that only one records is left with the highest number.DEBUG: query failed
SQL: INSERT INTO cms_module_comments (comment_id, page_id, comment_title, comment_author, author_email, author_website, comment_data, comment_date, module_name, create_date, modified_date, active, author_notify, ip) VALUES (************)
ERROR: Duplicate entry '17' for key 1
Hope this helps.
Gregor