From 631ebe4592e182e8255ec4d34c0e91678bf97b53 Mon Sep 17 00:00:00 2001 From: gBrunier Date: Fri, 12 Aug 2011 10:11:11 +0000 Subject: [PATCH] [-] MO : Replace ps_ by _DB_PREFIX_ --- modules/productcomments/ProductComment.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/productcomments/ProductComment.php b/modules/productcomments/ProductComment.php index 6ba3eb51f..30d43a7b3 100644 --- a/modules/productcomments/ProductComment.php +++ b/modules/productcomments/ProductComment.php @@ -106,10 +106,10 @@ class ProductComment extends ObjectModel return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT pc.`id_product_comment`, - (SELECT count(*) FROM `ps_product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment` AND pcu.`usefulness` = 1) as total_useful, - (SELECT count(*) FROM `ps_product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment`) as total_advice, '. - ($id_customer ? '(SELECT count(*) FROM `ps_product_comment_usefulness` pcuc WHERE pcuc.`id_product_comment` = pc.`id_product_comment` AND pcuc.id_customer = '.(int)$id_customer.') as customer_advice, ' : ''). - ($id_customer ? '(SELECT count(*) FROM `ps_product_comment_report` pcrc WHERE pcrc.`id_product_comment` = pc.`id_product_comment` AND pcrc.id_customer = '.(int)$id_customer.') as customer_report, ' : '').' + (SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment` AND pcu.`usefulness` = 1) as total_useful, + (SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment`) as total_advice, '. + ($id_customer ? '(SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_usefulness` pcuc WHERE pcuc.`id_product_comment` = pc.`id_product_comment` AND pcuc.id_customer = '.(int)$id_customer.') as customer_advice, ' : ''). + ($id_customer ? '(SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_report` pcrc WHERE pcrc.`id_product_comment` = pc.`id_product_comment` AND pcrc.id_customer = '.(int)$id_customer.') as customer_report, ' : '').' IF(c.id_customer, CONCAT(c.`firstname`, \' \', LEFT(c.`lastname`, 1)), pc.customer_name) customer_name, pc.`content`, pc.`grade`, pc.`date_add`, pc.title FROM `'._DB_PREFIX_.'product_comment` pc LEFT JOIN `'._DB_PREFIX_.'customer` c ON c.`id_customer` = pc.`id_customer`