Database Error

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN `webshop_category` `cat` ON `c`.`category_id`=`cat`.`category_id` LEFT JOIN' at line 4

SELECT `p`.`id`, `p`.`product_unique_id`, `p`.`product_title`, `p`.`brand_id`, `brands`.`name` as `brand_name`, `p`.`product_visible`, `p`.`path`, `p`.`product_introduction`, `p`.`gross`, `p`.`sale_gross`, `p`.`sale_start`, `p`.`sale_end`, ANY_VALUE(cat.category_id) AS category_id, ANY_VALUE(cat.title) as category_title, `co`.`hex`, `co`.`name` AS `color_name`, `p`.`product_visible`, `p`.`due_text`, `p`.`due_show_price` FROM `webshop_product` `p` JOIN `webshop_product_category` `c` ON `p`.`id`=`c`.`product_id` AND `c`.`category_id`= JOIN `webshop_category` `cat` ON `c`.`category_id`=`cat`.`category_id` LEFT JOIN `webshop_colors` `co` ON `co`.`color_id`=`p`.`color` LEFT JOIN `webshop_brands` `brands` ON `p`.`brand_id`=`brands`.`brand_id` WHERE `p`.`active` = 1 AND `p`.`product_visible` = 1 ORDER BY `p`.`created_on` DESC, `p`.`id` DESC, `p`.`created_on` desc, `p`.`id` desc LIMIT 999

Filename: models/Product_model.php

Line Number: 73