hello,
i was getting a error with mysql last night.
i was using php to enter some items into my database. it had been workign for a few days, then all of a sudden, it stopped working. up to that point, i had entered 127 items.
i logged into my database, through phpmyadmin to see what kind of error was happening.
this is what i got:
Error
SQL-query :
INSERT INTO Link_Info( Link_ID, UserName, Link_Display, Link_Description, Link_URL, Category )
VALUES (
'', 'user1, 'Artist-Ink.com', 'Free online gallery for artists, musicians and writers. Join for Free.', 'http://www.artist-ink.com', 'Arts & Humanities'
)
MySQL said:
#1062 - Duplicate entry '127' for key 1
key 1 or Link_ID was set up as a tinyint with a lenght of 8 and is auto incremented.
i took a look at the tab that shows the structure of your tables, and in red, under 'space usage' i saw 'OVERHEAD 748 bytes' or something like that. i clicked on optomize table and this disappeared.
after that i tried to enter some info, through phpmyadmin, and it still didn't work.
what i ended up doing, to get it to work was change Link_ID to int(200)
does anyone know why i was getting this error?
how can i prevent it in the future?
is int(200) ok for this field, or should i change it to something else?
thanks for your help.