sql - CONFLICT WITH "00:00:00" as END_TIME -
i have query:
select `s`.`time` , sum( s.love ) total_love, sum( s.sad ) total_sad, sum( s.angry ) total_angry, sum( s.happy ) total_happy (`employee_workshift` e) join `workshift` w on `e`.`workshift_uuid` = `w`.`uuid` join `shift_summary` s on `w`.`uuid` = `s`.`workshift_uuid` `s`.`location_uuid` = '81956feb-3fd7-0e84-e9fe-b640434dfad0' , `e`.`employee_uuid` = '3866a979-bc5e-56cb-cede-863afc47b8b5' , `s`.`workshift_uuid` = '8c9dbd85-18a3-6ca9-e3f3-06eb602b6f38' , `s`.`time` >= cast( '18:00:00' time ) , `s`.`time` <= cast( '00:00:00' time ) , `s`.`date` '%2014-03%'
my problem returns "null" when changed 'end_time' "23:59:59", returned right data. i've got idea pull hour of both 'start_time' , 'end_time' , insert in loop between them.
$time_start = 15; $time_end = 03; should produce: 15,16,17,18,19,20,21,22,23,00,01,02,03
then i'll compare them all. take lot of line , effort using "between". or should use "in_array"? have encountered this? hope help. thanks.
19:00 bigger 00:00 - approach should not work.
try using full timestamp (including date) data need.
Comments
Post a Comment