mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
Corrected issue with attendants number query
This commit is contained in:
parent
1821e50116
commit
e857d3a37e
1 changed files with 2 additions and 0 deletions
|
@ -545,6 +545,7 @@ class Appointments_Model extends CI_Model {
|
||||||
->select('count(*) AS attendants_number')
|
->select('count(*) AS attendants_number')
|
||||||
->from('appointments')
|
->from('appointments')
|
||||||
->group_start()
|
->group_start()
|
||||||
|
->group_start()
|
||||||
->where('start_datetime <=', $slot_start->format('Y-m-d H:i:s'))
|
->where('start_datetime <=', $slot_start->format('Y-m-d H:i:s'))
|
||||||
->where('end_datetime >', $slot_start->format('Y-m-d H:i:s'))
|
->where('end_datetime >', $slot_start->format('Y-m-d H:i:s'))
|
||||||
->group_end()
|
->group_end()
|
||||||
|
@ -552,6 +553,7 @@ class Appointments_Model extends CI_Model {
|
||||||
->where('start_datetime <', $slot_end->format('Y-m-d H:i:s'))
|
->where('start_datetime <', $slot_end->format('Y-m-d H:i:s'))
|
||||||
->where('end_datetime >=', $slot_end->format('Y-m-d H:i:s'))
|
->where('end_datetime >=', $slot_end->format('Y-m-d H:i:s'))
|
||||||
->group_end()
|
->group_end()
|
||||||
|
->group_end()
|
||||||
->where('id_services', $service_id)
|
->where('id_services', $service_id)
|
||||||
->get()
|
->get()
|
||||||
->row()
|
->row()
|
||||||
|
|
Loading…
Reference in a new issue