我有几个日期时间查询。我需要获得SUM并显示用户端。我怎样才能做到这一点?
查询
-v
我尝试了这个,但它不起作用......
$sqlmon="SELECT * , TIMEDIFF(t.timeouthour, t.timeinhour) AS Duration
FROM timesheets t
WHERE employee_id='$session_myemployeeid'
AND timeinyear='$currentyear'
AND timeinmonth='$currentmonth'
AND timeinday='Monday' ";
$resultmon=mysqli_query($db,$sqlmon);
$sqltues="SELECT * , TIMEDIFF(t.timeouthour, t.timeinhour) AS Duration
FROM timesheets t WHERE employee_id='$session_myemployeeid'
AND timeinyear='$currentyear'
AND timeinmonth='$currentmonth'
AND timeinday='Tuesday' ";
$resulttuesday=mysqli_query($db,$sqltues);
[5 more...]