Home › Forums › Scripts › Geekish.me Scripts › Quotish Error
Tagged: duplicate entry, error, help, quotish
This topic contains 8 replies, has 5 voices, and was last updated by Casey 2 years ago.
-
AuthorPosts
-
May 16, 2011 at 12:25 am #13868
AnonymousI’ve tried contacting Hannah about this, but she hasn’t replied.
I’ve been getting this error everytime I try to post a few quote.Duplicate entry '127' for key 1The quotes are NOT duplicates. I’ve checked. So I don’t understand where this error is coming from. I never got this error before now. The script used to work great.
May 16, 2011 at 1:03 am #14546It’s because they are [probably] trying to repeat the ID for the quotes in the DB. It’d be helpful if you could show us the DB info on the quote’s table. Try these in order.
1) Execute this in PhpMyAdmin to reset its auto_increment which is what I think is glitching it.
ALTER TABLE #QUOTETABLENAME# AUTO_INCREMENT = 128;
Obviously fix the #quotestablename#

2) Alternatively, also try rebuilding the table’s indexes to hopefully fix it.
3) If that doesn’t work try looking in the quote’s table for a row with an ID of 127 and delete it and re-add it in the script, then add the ones you need after.
If none of these work, you could export the tables structure and data, delete it and re-add it.
May 16, 2011 at 7:04 am #14547It’ll be because the ID field is a tinyint – the maximum number that can be is 127. The column needs to be changed to an int – I’ll post some code later
May 16, 2011 at 5:47 pm #14548Go to your Quotish database in phpMyAdmin and then click the SQL tab, then paste this in:
ALTER TABLE quotish_quotes CHANGE id id INT UNSIGNED NOT NULL AUTO_INCREMENT(where quotish_quotes is your table name – if yours is called something different, write that value there instead)
That will fix the problem.
May 18, 2011 at 3:59 am #14549
AnonymousI’m sorry, but I don’t understand.
I’m so confused now. I have no idea what to do with this code you all are giving me or where to put it or anything.
May 18, 2011 at 5:16 am #145501) Go to phpMyAdmin
2) Click the Quotish database’s name in left column.
3) After clicking on that, in the right content section, on the top, you will see a list of tabs: Structure, SQL, Search, Query, Export, Import…
Click on the one that says SQL
4) In the text area enter the SQL statement that Amelie posted above.
Make sure that “quotish_quotes” is the correct table name (i.e. check that this name is present in the list on the left). If it is not, find the correct table name and use that.
5) Click “go”
That’s it.
May 18, 2011 at 6:58 pm #14551Amelie, can have any integer with 255 characters or less…depending upon what is set obviously as it’s max field length.
May 24, 2011 at 2:08 pm #14552Casey, not sure what you’re saying there… but Amelie is right; tinyint data type only supports up to 127 (that is, the number 127, not 127 characters) unless it’s signed (maybe that’s what you’re referring to?)
May 24, 2011 at 8:24 pm #14553Oh; sorry. Oops, I got confused lol.
-
AuthorPosts
You must be logged in to reply to this topic.



Recent Comments