logics

Ошибка в mysql запросе

514

// WHERE item.catigor = {$cat} AND item.id = item_attr_value.item_id");

515

return $this->db->select("

516

SELECT * FROM {$table}, item_attr_{$cat}

517 WHERE item.catigor = {$cat} AND item.id = item_attr_{$cat}.item_id {$where} {$order} {$limit}");

518

}

519

520

public function getCatalogFilterCount($tableName = 'item', $cat, $where = ''){
22-11-2024 Ошибка в SQL запросе: № 1064

Описание ошибки: 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 'AND `count` > 0 ORDER BY item.count DESC, item.id DESC LIMIT 0,20' at line 2

SQL строка: SELECT * FROM item, item_attr_154 WHERE item.catigor = 154 AND item.id = item_attr_154.item_id AND item.brand = 'Pirelli' AND item.model = 'Cinturato All Season SF2' AND item_attr_154.season <= all AND `count` > 0 ORDER BY item.count DESC, item.id DESC LIMIT 0,20

Вызов из /var/www/a4work/data/www/xn--80apgbmchndhd8exb0d.xn--p1ai/Component/Model_Section/Catalog/Class.php строка № 517