Announcement

Collapse
No announcement yet.

Duplicate entry '' for key 'product_model_number'

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Duplicate entry '' for key 'product_model_number'

    I am scratching my head trying to figure this out.

    Code:
    Failed to execute query on line[ 3935]: 1062Error Message: Duplicate entry '' for key 'product_model_number'
    
    Query: INSERT INTO `ec_product` (is_demo_item, model_number, activate_in_store, title, description, price, list_price, seo_description, seo_keywords, image1, manufacturer_id, is_taxable, is_shippable, stock_quantity, max_purchase_quantity) VALUES(0, '', 1, 'Round 1.09ct I color', 'Round ', 54.25, 54.25, 'Round 1.09 of a I color.', 'certified wholesale', 'http://example.com/../images/icon-round.png', 1, 1, 1, 1, 1)
    Looking through the table schema of ec_product I cannot find "product_model_number" field. Is this field located somewhere else? Is there a constraint I am not aware of?

    Any suggestions?

    Thank you!

  • #2
    I feel embarrassed saying this my insert statement had a typo in it, which was causing null values being passed into the "model_number" which does NOT accept nulls. Once I fixed that typo worked like a charm.

    Comment

    Working...
    X