Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Auto-Increment MODEL Number - Anyone done it??


CC

Recommended Posts

I am trying to toy with the idea of how to auto increment the MODEL number for all new products added to the database.

 

I have thought about just making the table copy the product_id to the products_model in order to create the same id for both, thus saving time entering a made up Model Number.

 

The reason for this is becos we use the products_model field as out Part Code on our site, but we only make them random as we go through, but the more products we have the harder it becomes to track. So we decided on a way to auto increment.

But as the product_id is auto, I cant see a simple way to make products_model auto...

 

Anyone got any ideas?

Or has anyone done this in some way??

Link to comment
Share on other sites

Thanks, but it isnt quite what I am after.

I need something automated as there are a number of people adding to our website, so the model number needs to be created itself.

 

I think copying the Product_id to products_model might end up being the best way.

 

Thanks tho.

Link to comment
Share on other sites

You should be able to do this using phpadmin. Change the field to auto increment. Shouldn't be too much of a problem. Don't know how it will go when you try and save a product after editing as it may bork (perhaps edit the mysql query to not update or something?)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...