Error 42000

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 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 ') WHERE cat.purpose_id = 0 and t.id <> 261 and t.status > 0 ORDER BY RAND() ' at line 1. The SQL statement executed was: SELECT DISTINCT `t`.`id`, `t`.`name_en`, `t`.`name_ar`, `t`.`manufacturer_id`, `t`.`description_en`, `t`.`sell_price`, `t`.`stock_price`, `t`.`quantity`, `t`.`in_carts_quantity`, `t`.`weight`, `t`.`tax_id`, `t`.`created_at`, `t`.`updated_at`, `t`.`image_uri`, `t`.`is_available`, `t`.`is_featured`, `t`.`description_ar`, `t`.`sale_id`, `t`.`has_shipping_method`, `t`.`more_info`, `t`.`attributes_checksum`, `t`.`reviews_rate`, `t`.`reviews_stat`, `t`.`sold_quantity`, `t`.`short_name`, `t`.`status`, `t`.`item_code`, `t`.`pieces_per_pack`, `t`.`packs_per_box`, `t`.`cbm`, `t`.`name_fr`, `t`.`description_fr`, `t`.`price_in_dollar`, `t`.`collection_id`, `t`.`sku`, `t`.`dimensions`, `t`.`on_sale`, `t`.`old_price`, `t`.`item_order`, `t`.`new_price`, `t`.`artwork_id` FROM `tbl_item` `t` inner join tbl_item_category as itemCat on itemCat.item_id = t.id inner join tbl_category as cat on itemCat.category_id in ( ) WHERE cat.purpose_id = 0 and t.id <> 261 and t.status > 0 ORDER BY RAND() LIMIT 10

line: 543 in:/home/ubuntu/yii/yii-1.1.17.467ff50/framework/db/CDbCommand.php

Take Me Home