[-] BO: Invoices and products order detail are now not empty after deleting a product

This commit is contained in:
rGaillard
2012-08-07 12:20:10 +00:00
parent 7a96b768c7
commit 63a2b6c9f2
6 changed files with 20 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
SET NAMES 'utf8';
ALTER TABLE `PREFIX_order_detail` ADD `id_shop` INT(11) UNSIGNED NOT NULL AFTER `id_warehouse`, ADD INDEX (`id_shop`);
UPDATE `PREFIX_order_detail` od SET `id_shop`=(SELECT `id_shop` FROM `PREFIX_orders` WHERE `id_order`=od.`id_order`);