Forum Moderators: coopster
Could also be a unique field, though less likely; in that case, you just have to pick a value that's not already in that field.
I've had a look at the table structure in phpMyAdmin, see below,
fieldname int(5) UNSIGNED No 0 Change Drop Primary Index Unique Fulltext
With 'Fulltext' not shown as a link.
Looks like its not a primary key field type, I think this is why its not inserting into the DB.
Woldie
fieldname int(5) UNSIGNED No 0 Change Drop Primary Index Unique Fulltext
are all those little icons in the "Action" section. It doesn't really mean anything unless you know which way they are set. In other words, phpMyAdmin shows those options for every field, whether it's a primary key or not, but I think the color of the icon changes. It certainly makes no sense that a unique indexed integer field would have a fulltext index (it's only allowed on char, varchar and text columns).
What you probably have is a field that is set to "unique" and you are trying to insert the same value over again. You probably do not want to insert that value again and it's a problem in your script logic. It looks, for example, that some value is not getting passed and you're always trying to set that unique columnto zero, which creates a problem.
Assuming you do want to have duplicate values in that field, you'll need to change the table structure. To find out what the tables look like, in your phpMyAdmin SQL window, try entering the following
DESCRIBE mytable;
then
SHOW KEYS FROM mytable;
That will tell you all about the structure of the fields in question and we can take it from there.