View Single Post
Old 03-28-2009, 01:52 PM  
gornyhuy
Chafed.
 
gornyhuy's Avatar
 
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
If you have a unique index defined on one of your fields and then you try to insert duplicate values into that table the item with a unique key will cause it to fail.

Looks like you have isbn defined as a primary key on your order_items table, which means you will never be able to insert the same book twice.


EDIT: on closer inspection - the key is actually defined on the combination of order id and isbn, so that should be okay actually. You probably have already entered some of this data before and are now tyring to enter duped data where it is uniquely keyed.
__________________

icq:159548293

Last edited by gornyhuy; 03-28-2009 at 01:56 PM..
gornyhuy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote