You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) GROUP BY fv.id_feature, IFNULL(fv.custom, 0)' at line 3
in filecontrollers/admin/AdminFeaturesController.phpat line745
SELECT id_feature, IFNULL(fv.custom, 0) as is_custom, COUNT(fv.id_feature_value) as count_values
FROM `ps_feature_value` fv
WHERE (fv.id_feature IN ())
GROUP BY fv.id_feature, IFNULL(fv.custom, 0)
Question
the.rampage.rado
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) GROUP BY fv.id_feature, IFNULL(fv.custom, 0)' at line 3
$ids = array_map('intval', array_column($this->_list, 'id_feature')); 728: $extra = []; 729: foreach ($ids as $id) { 730: $extra[$id] = [ 731: 'value' => 0, 732: 'custom' => 0, 733: 'products' => 0, 734: ]; 735: } 736: 737: $conn = Db::getInstance(_PS_USE_SQL_SLAVE_); 738: 739: // count feature values 740: $valuesQuery = new DbQuery(); 741: $valuesQuery->select('id_feature, IFNULL(fv.custom, 0) as is_custom, COUNT(fv.id_feature_value) as count_values'); 742: $valuesQuery->from('feature_value', 'fv'); 743: $valuesQuery->where('fv.id_feature IN ('. implode(',', $ids).')'); 744: $valuesQuery->groupBy('fv.id_feature, IFNULL(fv.custom, 0)'); 745: $res = $conn->executeS($valuesQuery); 746: if (is_array($res)) { 747: foreach ($res as $row) { 748: $id = (int)$row['id_feature']; 749: if ($row['is_custom']) { 750: $extra[$id]['custom'] = (int)$row['count_values']; 751: } else { 752: $extra[$id]['value'] = (int)$row['count_values']; 753: } 754: } 755: }What is causing this issue?
I'm on almost latest bleeding edge and I have features in other 2 shops with this version. I didn't need them in this one until now.
Cheers!
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now