forked from mirrors/easyappointments
Only load the required events and not all the database records (for better performance).
This commit is contained in:
parent
edaa821957
commit
716378f074
1 changed files with 4 additions and 4 deletions
|
@ -199,8 +199,8 @@ class Backend_api extends CI_Controller {
|
|||
// Get appointments
|
||||
$where_clause = [
|
||||
$where_id => $this->input->post('record_id'),
|
||||
//'start_datetime >=' => $this->input->post('start_date'),
|
||||
//'end_datetime <=' => $this->input->post('end_date'),
|
||||
'DATE(start_datetime) >=' => $this->input->post('start_date'),
|
||||
'DATE(start_datetime) <=' => date('Y-m-d', strtotime($this->input->post('end_date') . ' +1 day')),
|
||||
'is_unavailable' => FALSE
|
||||
];
|
||||
|
||||
|
@ -218,8 +218,8 @@ class Backend_api extends CI_Controller {
|
|||
{
|
||||
$where_clause = [
|
||||
$where_id => $this->input->post('record_id'),
|
||||
//'start_datetime >=' => $this->input->post('start_date'),
|
||||
//'end_datetime <=' => $this->input->post('end_date'),
|
||||
'DATE(start_datetime) >=' => $this->input->post('start_date'),
|
||||
'DATE(start_datetime) <=' => date('Y-m-d', strtotime($this->input->post('end_date') . ' +1 day')),
|
||||
'is_unavailable' => TRUE
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue