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(m.additive_plants=1 OR m.lube_oil_blending_plants=1) GROUP BY `mp`.`map_...' at line 1
The SQL being executed was: SELECT `title`, `permalink`, `longtitude`, `latitude`, `c`.`name` AS `company_name`, `m`.`map_id`, `mp`.`product_id`, `additive_plants`, `base_oil_refineries`, `lube_oil_blending_plants`, `grease_plants`, `rdt` FROM `maps` `m` LEFT JOIN `map_products` `mp` ON mp.map_id = m.map_id LEFT JOIN `products` `p` ON p.id = mp.product_id LEFT JOIN `companies` `c` ON c.company_id = m.company_id WHERE AND(m.additive_plants=1 OR m.lube_oil_blending_plants=1) GROUP BY `mp`.`map_id`, `mp`.`product_id`

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(m.additive_plants=1 OR m.lube_oil_blending_plants=1)  GROUP BY `mp`.`map_...' at line 1
)
$_GET = [
    'country' => '6',
    'product' => '1-3',
    'k' => '',
];