From 0d62556fa08967e9dfd09d4b3c93ed1fc1b34104 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Nov 2014 11:01:53 +0100 Subject: [PATCH] Maj doc --- htdocs/install/mysql/migration/repair.sql | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 8c334f9966d..4083ba2f7b9 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -189,9 +189,12 @@ UPDATE llx_projet_task_time set task_datehour = task_date where task_datehour IS -- update llx_facture set tva = total_ttc - total where tva = 0; -- To insert elements into a category --- Search idcategory: select rowid from llx_categorie where type=0 and label like '%xxx%' --- Select all products to include: select * from llx_product where label like '%xxx%' --- If ok, insert: insert into llx_categorie_product(fk_categorie, fk_product) select idcategory, rowid from llx_product where label like '%xxx%' +-- Search idcategory: select rowid from llx_categorie where type=0 and ref like '%xxx%' +-- Select all products to include: select * from llx_product where ref like '%xxx%' +-- If ok, insert: insert into llx_categorie_product(fk_categorie, fk_product) select idcategory, rowid from llx_product where ref like '%xxx%' +-- List of product with a category xxx: select distinct cp.fk_product from llx_categorie_product as cp, llx_categorie as c where cp.fk_categorie = c.rowid and c.label like 'xxx-%' order by fk_product; +-- List of product into 2 categories xxx: select cp.fk_product, count(cp.fk_product) as nb from llx_categorie_product as cp, llx_categorie as c where cp.fk_categorie = c.rowid and c.label like 'xxx-%' group by fk_product having nb > 1; +-- List of product with no category xxx yet: select rowid, ref from llx_product where rowid not in (select distinct cp.fk_product from llx_categorie_product as cp, llx_categorie as c where cp.fk_categorie = c.rowid and c.label like 'xxx-%' order by fk_product); -- Replace xxx with your IP Address -- bind-address = xxx.xxx.xxx.xxx