Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Posible DataBase Bug


Recommended Posts



This was posted a while ago, but nobody replied, so I'm posting it again with more info.


Right. My problem is that whenever I add an item, it doesn't show up properly or not at all. The problem is caused by the fact that every new product added in admin is given the product id "0" in the database. The reason for this, i'm not sure, but it's most likely due to the fact that I imported about 1000 products from another store using Access and the myODBC driver. This works fine, and all items display fine.


However, when I try to add something in the admin tool, the above happens. I'm still able to add products in Access through the myODBC driver however, with no issues.


My question is this; how does OSC determine what product id to give an item added in admin. Clearly it doesn't follow on from the earlier entries, so how does it determine it?


Any help would be really REALLY appreciated, as it's driving my sites owner nuts.

:: jason madigan ::

:: http://www.nuphor.com ::

:: icq - 66321362 ::

Link to comment
Share on other sites

The product_id is generated by MySQL when an insert is statement is executed on the products table. This happens because the produts_id field is set to be auto_increment. Your particular problem seems very unusaul though since, if I am remembering correctly, recent versions of MySQL will not allow you to insert a 0 into an auto_increment column. Have you done a 'show columns from products' in MySQL and confirmed that the auto_increment flag is set for the products_id column?

Link to comment
Share on other sites

The id is determined by My SQL (auto_increment) - not sure, but perhaps when you imported your products you assigned product_id's that a not just ordered numbers?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...