getDbCriteria Call to a member function getDbCriteria() on a non-object
Posted 17 January 2011 - 08:15 AM
Call to a member function getDbCriteria() on a non-object
i've got write permission and the object is not empty, whats wrong ???
$model = new Project(); //name of my model Project refers to Mysql innoDB table tblproject.
$dataProvider = new CActiveDataProvider($daten);
Posted 17 January 2011 - 09:16 AM
first i thank for the quick answer
but im sure that i pass the correct variable name - u can see the code above
Posted 17 January 2011 - 10:17 AM
The auto-generated code that you are using extends Controller, wich is a file in /protected/components wich extends CController.
The code you shared is correct, the point is if in the view index you are correctly passing the variable to the widget.
Posted 17 January 2011 - 10:19 AM
So i created a method ( public function ) in the Model.
but now it says:
Fatal error: Call to a member function getDbCriteria() on a non-object in C:\xampp\yii\framework\web\CActiveDataProvider.php on line 114
it happens somewhere in the view, zaccaria was right with that,
but i don't
have any clue
what and where
in the view