hi guys i have problem i have data table here this
CREATE TABLE IF NOT EXISTS offer_detail (
id int(60) NOT NULL AUTO_INCREMENT,
company_id int(60) NOT NULL,
offertype_id int(60) NOT NULL,
category_id int(60) NOT NULL,
offer_title varchar(150) NOT NULL,
offer_description text NOT NULL,
image varchar(150) NOT NULL,
coupon_id varchar(60) NOT NULL,
price text NOT NULL,
unit_id varchar(60) NOT NULL,
price_now varchar(60) NOT NULL,
from varchar(80) NOT NULL,
to varchar(80) NOT NULL,
user_id int(10) NOT NULL,
created varchar(11) NOT NULL,
modified varchar(10) NOT NULL,
Active varchar(100) NOT NULL,
PRIMARY KEY (id),
KEY company_id (company_id,category_id,coupon_id,unit_id),
KEY category_id (category_id,coupon_id,unit_id),
KEY coupon_id (coupon_id),
KEY unit_id (unit_id),
KEY offertype_id (offertype_id),
KEY user_id (user_id,Active)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
i have button in user profile
when member click "see my offer" button i need to show list of offer detail which user add i need show it separate page (view)(attach sreen shot …how select user id using button .
can i implement this action for my search or view
[color="#FF0000"]$offer = OfferDetail::model()->find(‘user_id=:user_id’,
array(':user_id'=>Yii::app()->user->id));
$this->render(‘offer-detail-view’, array(‘model’=>$offer));[/color]
plz some one can help how implement this in yii MVC i confuse how code controll & view file
HINT I’m using session for get user id when insert offer detail by user
$model->user_id=Yii::app()->user->id;
please send me solution thank you…