Hello all.
I have a form on my test site that I can't get set up. I set up the form, then publish it, then go to submit a test and I get the following error:
* user warning: Duplicate entry '36' for key 1 query: INSERT INTO webform_submissions (nid, sid, uid, submitted, remote_addr) VALUES (329, 36, 1, 1229830850, '70.29.15.184') in /home/website/public_html/my-website/includes/database.mysql.inc on line 174.
* user warning: Duplicate entry '36-1-0' for key 1 query: INSERT INTO webform_submitted_data (nid, sid, cid, no, data) VALUES (329, 36, 1, 0, 'Test tester') in /home/website/public_html/my-website/includes/database.mysql.inc on line 174.
After, I go to the components, and they are gone. This is a very simple form that has 3 components included. I have other forms on the site.
I do not have this problem on my live site. I have tried using phpmyadmin to export the webform tables and then import them to my test site and it has not worked. I can't do a full import of the Drupal database as I am doing some development on the test site that is not yet on the live site and I don't want to lose it. I have also uploaded the webform directory.
Any thoughts as to what else I can try? I'm not really much of a coder (other than html/css), so I'm at a bit of a loss.
Thanks for any help you can provide!
Shrill
Comments
Comment #1
shrill commentedJust adding a comment to say that I did it again, and this time the components remained. But I am still getting the error. The Duplicate entry number increases by 1 with each submit.
Comment #2
quicksketchThis is on Drupal 5? My guess is that your sequences table is screwed up. Drupal 5 keeps the current increment of sequences in this special table, and if it was not moved over the same time as you pulled in your Webform tables, they might be out of sync. A query like this might fix the problem:
Comment #3
shrill commentedThanks for your help. Yes it is Drupal 5.
I'm trying this query in phpmyadmin and I get the following error:
Thanks again!
Comment #4
quicksketchThat code I posted above is actually PHP code, with 2 SQL queries inside of it. If you need to do this all in a query (which using phpMyAdmin, you will), try this:
Comment #5
shrill commentedIt worked! Thanks so much!
Comment #6
quicksketchHee, lucky guess. :)