in reply to duplicate key check isn't, why not?

Why would this query fail when there obviously is no duplicate in that table?

It doesn't fail on querying from the table, but on inserting. And because it fails, there are no duplicates in the table.

I don't understand your code, it's full of variables that I haven't seen the definition of, neither do we know anything about the table, the queries or the constraints on the table, but if the database complains that you're trying to add a key that's already there, you can be pretty sure that that's what you're doing wrong.

  • Comment on Re: duplicate key check isn't, why not?