Customizing msql query in dhtmlxscheduler using codeigniter

Hi,

I’m new to codeigniter and this is my first time using dhtmlxScheduler. Can anyone tell me how to customize the database query? From the tutorials and documentation, all the data from the table is being displayed. However, I want to specify which to display from the database using the WHERE clause. For example, select * from task where email = …

Hi,
you can add filtration rules with php code:
docs.dhtmlx.com/doku.php?id=dhtm … ext_filter
or to pass ready sql query with all needed rules to the connector: $schedulerConnector->render_sql("SELECT * FROM events WHERE ...","event_id","start_date,end_date,event_name,details");

Hi,

Thanks for the reply. I tried the code above but it doesn’t work…
This is my original code, downloaded from using dhtmlx connector with code igniter.

public function data()
{
//data feed
$this->load->database();

	$connector = new SchedulerConnector($this->db, "PHPCI");
	$connector->configure("task", "TaskId", "StartDate, DateDue, Description");
	$connector->event->attach($this);
            $connector->render();

}

any idea which part of the code should i change?

Try to replace it as

$connector = new SchedulerConnector($this->db, "PHPCI"); $sql = "SELECT * FROM task WHERE ... filter rules here ... "; $connector->event->attach($this); $connector->render_sql($sql, "TaskId", "StartDate, DateDue, Description");