ramiwahdan Posted March 16, 2020 Share Posted March 16, 2020 Hi, i am trying to add where clause to the code below: $res = $conn->query("SELECT oracleid , name , des , clockingindate as clockin , clockingoutdate as clockout , timediff(clockingoutdate, clockingindate) as duration , total FROM attendance_records JOIN ( SELECT oracleid , sec_to_time(sum(timestampdiff(SECOND, clockingindate, clockingoutdate))) as total FROM attendance_records GROUP BY oracleid ) tots USING (oracleid) ORDER BY oracleid, clockingindate "); i need to add where clause as following: From attendance_records where isdone = -1 Join... how to achieve that Quote Link to comment https://forums.phpfreaks.com/topic/310298-where-clause-in-pdo/ Share on other sites More sharing options...
ginerjm Posted March 16, 2020 Share Posted March 16, 2020 Why don't you do some good old experimentation and see where it works? Or you could look it up in a manual. 1 Quote Link to comment https://forums.phpfreaks.com/topic/310298-where-clause-in-pdo/#findComment-1575487 Share on other sites More sharing options...
ramiwahdan Posted March 16, 2020 Author Share Posted March 16, 2020 (edited) found it Edited March 16, 2020 by ramiwahdan finish Quote Link to comment https://forums.phpfreaks.com/topic/310298-where-clause-in-pdo/#findComment-1575490 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.