Reputation: 529
I have set up model with gii and I have table call make and it has a few columns, there is one that is called make, how can I get all the data from column make back in the controller.
here is my action
public function actionAutoCompleteMake()
{
$makeModel= Make::model()->load(fieldMake);
}
Upvotes: 5
Views: 25284
Reputation: 1712
You can do this also with some condition :-
$criteria = new CDbCriteria;
$criteria->select = "fieldMake";
$criteria->condition = " fieldName = fieldValue";
$results = Make::model()->findAll($criteria);
May be It will help you also.
Upvotes: 1