No, you weren't, but I think there was a different solution/reason for what was going on.
I'll see if I can find that thread (or if you can). But if you look at the table definition for any of the tables manged through DBSQL.pm and the "add" routine, the ID field is automatically generated, and unique. I had a problem early on trying to use DBSQL.pm with tables where I was using a different key field. I gave up and added the ID field even if I wasn't using it. Alex considered (and may have) made changes to allow use of the routines with the "?" auto-increment field as the first field, but I never really went back. I just changed my own logic and thinking to use ID #'s as the key field.
I might be subtly confusing things, I'll have to check -- (see if I can insert another record with the same ID in a table) _BUT_ in links, the ID (auto-increment) field is declared as "PRIMARY". Primary is a "UNIQUE" key, and thus, whether or not "AUTO_INCREMENT" allows duplicate values, the "PRIMARY" attribute to that field would not.
An AUTO_INCREMENT field must be indexed, but I can't find documented anywhere if it has to be "UNIQUE."
In Links, it _IS_ UNIQUE by virtue of being declared "PRIMARY".
http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/
I'll see if I can find that thread (or if you can). But if you look at the table definition for any of the tables manged through DBSQL.pm and the "add" routine, the ID field is automatically generated, and unique. I had a problem early on trying to use DBSQL.pm with tables where I was using a different key field. I gave up and added the ID field even if I wasn't using it. Alex considered (and may have) made changes to allow use of the routines with the "?" auto-increment field as the first field, but I never really went back. I just changed my own logic and thinking to use ID #'s as the key field.
I might be subtly confusing things, I'll have to check -- (see if I can insert another record with the same ID in a table) _BUT_ in links, the ID (auto-increment) field is declared as "PRIMARY". Primary is a "UNIQUE" key, and thus, whether or not "AUTO_INCREMENT" allows duplicate values, the "PRIMARY" attribute to that field would not.
An AUTO_INCREMENT field must be indexed, but I can't find documented anywhere if it has to be "UNIQUE."
In Links, it _IS_ UNIQUE by virtue of being declared "PRIMARY".
http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/