Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

Database Exceptionyii\db\Exception

SQLSTATE[42000]: Syntax error or access violation: 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 p.attivo = 1 AND p.parent_id != 0 GROUP BY `perno`.`product_id` ORDER BY ...' at line 1
The SQL being executed was: SELECT COUNT(*) FROM (SELECT `p`.`prezzo`, `m`.`qty`, `m`.`illimitati`, `p`.`nome`, `s`.`slug`, `perno`.`product_id`, `p`.`sconto`, `t`.`valore`, `i`.`images`, `im`.`images` AS `img` FROM `perno` LEFT JOIN `products` `p` ON p.product_id = perno.product_id LEFT JOIN `tax` `t` ON p.tax_id = t.tax_id LEFT JOIN `seo` `s` ON perno.product_id = s.product_id LEFT JOIN `images` `i` ON perno.product_id = i.product_id AND i.order = 1 LEFT JOIN `images` `im` ON perno.product_id = im.product_id AND im.order = 2 LEFT JOIN `magazzino` `m` ON perno.product_id = m.product_id WHERE perno.category_id = AND p.attivo = 1 AND p.parent_id != 0 GROUP BY `perno`.`product_id` ORDER BY `p`.`sortOrder` DESC) `c`

Error Info: Array
(
    [0] => 42000
    [1] => 1064
    [2] => 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 p.attivo = 1 AND p.parent_id != 0 GROUP BY `perno`.`product_id` ORDER BY ...' at line 1
)
$_GET = [
    'id' => 'promozioni-mix-2022',
];

$_SESSION = [
    '__flash' => [],
    'theme' => 'promozioni-mix-2022',
];