fetching from the database (Scheduler + yii)

122 Views Asked by At

I use the scheduler in my yii project. Standard configuration connection to the Events table selects all events from the database.

public function actionScheduler_data()
{   
    $currentUser = User::model()->findByPk(Yii::app()->user->id);
    $scheduler = new SchedulerConnector(Events::model(), "PHPYii");
    $scheduler->enable_log("text.log");
    $scheduler->configure("-", "event_id", "start_date, end_date, event_name");
    $scheduler->render();
}

I need to be more flexible and to give only those events in which the user_id matches id of the current user.. How should I do in this situation? Very need help!

1

There are 1 best solutions below

0
On

You can read this documentation on how to use queries to load specific data. As by default the connector loads all data.