Skip to main content

Posts

Showing posts with the label relationship

YII, my sample model for search with relataionship

A model file for yii which has search fucntion which searches using relation ship: <?php /** * This is the model class for table "sf_category_slider". * * The followings are the available columns in table 'sf_category_slider': * @property integer $rec_id * @property integer $cat_id * @property string $brand_id * @property string $slider_image * @property string $slider_link */ class CategorySlider extends CActiveRecord { /** * Returns the static model of the specified AR class. * @return CategorySlider the static model class */ public $category_name ; public static function model ( $className = __CLASS__) { return parent :: model ( $className ); } /** * @return string the associated database table name */ public function tableName () { return 'sf_category_slider' ; } /** * @return array validation rules for model attribute...