PHP Classes

What if a product is deleted

Recommend this page to a friend!

      Shopping Cart  >  Shopping Cart package blog  >  AJAX Shopping Cart wi...  >  All threads  >  What if a product is deleted  >  (Un) Subscribe thread alerts  
Subject:What if a product is deleted
Summary:If a product is deleted from the database, an issue may occur.
Messages:2
Author:Joseph McMurry
Date:2015-09-21 16:08:05
 

  1. What if a product is deleted   Reply   Report abuse  
Picture of Joseph McMurry Joseph McMurry - 2015-09-21 16:08:05
If you allow products to be deleted from the database then your "order_items" table may have records pointing to nowhere. The typical solution to this is to store the name of the product in order_items as well.

  2. Re: What if a product is deleted   Reply   Report abuse  
Picture of Ashraf Gheith Ashraf Gheith - 2015-09-22 07:21:13 - In reply to message 1 from Joseph McMurry
Thank you, it is a good idea.