A Database Error Occurred

Error Number: 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`.`visible` = 1 AND `sc`.`visible` = 1 AND `c`.`visible` = 1 AND `e`...' at line 12

SELECT count(*) AS total FROM (`db_product` p) JOIN `db_brand` b ON `b`.`brand_id` = `p`.`brand_id` JOIN `db_subcategory` sc ON `p`.`subcategory_id` = `sc`.`subcategory_id` JOIN `db_category` c ON `sc`.`category_id` = `c`.`category_id` JOIN `db_category_event` ce ON `ce`.`category_id` = `c`.`category_id` JOIN `db_event_type` e ON `ce`.`event_id` = `e`.`event_id` WHERE `e`.`event_id` = 99 AND `b`.`brand_slug` = 'nike' AND `p`.`price` >= 0 AND `p`.`price` <= AND `p`.`visible` = 1 AND `sc`.`visible` = 1 AND `c`.`visible` = 1 AND `e`.`visible` = 1 AND `e`.`event_id` = 99

Filename: /home/mescadea/public_html/models/product_model.php

Line Number: 1416