[-] MO : Replace ps_ by _DB_PREFIX_
This commit is contained in:
1 parent
d98b438d5a
commit
631ebe4592
1 file changed
+4
-4
@@ -106,10 +106,10 @@ class ProductComment extends ObjectModel
|
|||||||
|
|
||||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||||
SELECT pc.`id_product_comment`,
|
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 `'._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 `ps_product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment`) as total_advice, '.
|
(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 `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 `'._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 `ps_product_comment_report` pcrc WHERE pcrc.`id_product_comment` = pc.`id_product_comment` AND pcrc.id_customer = '.(int)$id_customer.') as customer_report, ' : '').'
|
($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
|
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
|
FROM `'._DB_PREFIX_.'product_comment` pc
|
||||||
LEFT JOIN `'._DB_PREFIX_.'customer` c ON c.`id_customer` = pc.`id_customer`
|
LEFT JOIN `'._DB_PREFIX_.'customer` c ON c.`id_customer` = pc.`id_customer`
|
||||||
|
|||||||
Reference in new issue
Block a user