public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria = new CDbCriteria();
$criteria->order = 'item_id desc, sort_order asc';
$criteria->compare('item_id', $this->item_id, true);
$criteria->compare('category_id', $this->category_id, true);
$criteria->compare('title', $this->title, true);
$criteria->compare('sn', $this->sn, true);
$criteria->compare('unit', $this->unit, true);
$criteria->compare('stock', $this->stock);
$criteria->compare('min_number', $this->min_number, true);
$criteria->compare('market_price', $this->market_price, true);
$criteria->compare('shop_price', $this->shop_price, true);
$criteria->compare('currency', $this->currency, true);
$criteria->compare('skus', $this->skus, true);
$criteria->compare('props', $this->props, true);
$criteria->compare('props_name', $this->props_name, true);
$criteria->compare('item_imgs', $this->item_imgs, true);
$criteria->compare('prop_imgs', $this->prop_imgs, true);
$criteria->compare('pic_url', $this->pic_url, true);
$criteria->compare('desc', $this->desc, true);
$criteria->compare('location', $this->location, true);
$criteria->compare('post_fee', $this->post_fee, true);
$criteria->compare('express_fee', $this->express_fee, true);
$criteria->compare('ems_fee', $this->ems_fee, true);
$criteria->compare('is_show', $this->is_show);
$criteria->compare('is_promote', $this->is_promote);
$criteria->compare('is_new', $this->is_new);
$criteria->compare('is_hot', $this->is_hot);
$criteria->compare('is_best', $this->is_best);
$criteria->compare('is_discount', $this->is_discount);
$criteria->compare('click_count', $this->click_count, true);
$criteria->compare('sort_order', $this->sort_order);
$criteria->compare('create_time', $this->create_time, true);
$criteria->compare('update_time', $this->update_time, true);
$criteria->compare('language', $this->language, true);
return new CActiveDataProvider($this, array('criteria' => $criteria));
}