Code: Select all
select a.*, c.date_stamp as user_date_stamp, b.note as note from punch as a, punch_control as b, user_date as c, users as d where a.punch_control_id = b.id AND b.user_date_id = c.id AND c.user_id = d.id AND d.company_id = '1' AND c.user_id = '1' AND c.date_stamp >= '2007-04-09 00:00:00' AND c.date_stamp <= '2007-04-15 23:59:59' AND ( a.deleted = 0 AND b.deleted = 0 AND c.deleted = 0 ) ORDER BY a.time_stamp asc, a.status_id desc, a.punch_control_id asc;
returns
In 9:45 AM
Out 1:08 PM L
In 1:48 PM L
Out 6:30 PM
In 11:15 AM
the output from debugging.
(mysqlt): select session_id,user_id,ip_address,created_date,updated_date from authentication WHERE session_id = '86a7a03baf2e338d9bda6c7b0c14f6b6' AND ip_address = '10.10.109.192' AND updated_date >= 1176203471
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): update authentication set updated_date = 1176217871 where session_id = '86a7a03baf2e338d9bda6c7b0c14f6b6'
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SET SESSION time_zone='America/Detroit'
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from station where company_id = '1' AND station_id = 'a511fd8ac2fba7159a193ce90ba51755' AND deleted = 0
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from cron WHERE deleted = 0 ORDER BY last_run_date DESC LIMIT 1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select d.severity_id as severity_id, count(*) as count from exception as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN exception_policy as d ON a.exception_policy_id = d.id LEFT JOIN pay_period as e ON b.pay_period_id = e.id where b.user_id = '1' AND b.date_stamp < '2007-04-10 00:00:00' AND e.status_id = 10 AND NOT EXISTS ( select z.id from request as z where z.user_date_id = a.user_date_id AND z.status_id = 30 ) AND ( a.deleted = 0 AND b.deleted = 0 AND e.deleted=0) GROUP BY d.severity_id ORDER BY d.severity_id desc
--------------------------------------------------------------------------------
/tmp/timetrex//8f/adodb_8fad02a0ca0445208f29b0128a30344a.cache reloaded, ttl=82012 [ select * from user_generic_data where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): select * from user_generic_data where user_id = '1' AND script = '/interface/timesheet/ViewUserTimeSheet.php' AND is_default = 1 AND deleted = 0 order by updated_date desc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SELECT a.object_id, a.parent_id, a.left_id, a.right_id, count(b.object_id)-1 as level FROM user_group_tree a LEFT JOIN user_group_tree b ON a.tree_id = b.tree_id AND a.left_id BETWEEN b.left_id AND b.right_id WHERE a.tree_id = '1' AND a.object_id = 0 GROUP BY a.object_id, a.left_id, a.object_id, a.parent_id, a.right_id
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SELECT object_id FROM user_group_tree WHERE tree_id = '1' AND parent_id = -1 LIMIT 1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SELECT a.object_id, a.parent_id, a.left_id, a.right_id, count(b.object_id)-1 as level FROM user_group_tree a LEFT JOIN user_group_tree b ON a.tree_id = b.tree_id AND a.left_id BETWEEN b.left_id AND b.right_id WHERE a.tree_id = '1' AND a.object_id = '0' GROUP BY a.object_id, a.left_id, a.object_id, a.parent_id, a.right_id
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SELECT a.object_id, a.parent_id, count(b.object_id)-1 as level FROM user_group_tree a LEFT JOIN user_group_tree b ON a.tree_id = b.tree_id AND a.left_id BETWEEN b.left_id AND b.right_id WHERE a.tree_id = '1' AND b.left_id >= '1' AND b.right_id <= '143' AND a.object_id != '0' GROUP BY a.object_id, a.parent_id, a.left_id ORDER BY a.left_id
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 2
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 6
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 7
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 8
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 9
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 10
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 11
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 12
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 3
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 4
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 5
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from branch where company_id = '1' AND deleted = 0
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from department where company_id = '1' AND deleted = 0
--------------------------------------------------------------------------------
/tmp/timetrex//4c/adodb_4c9dda71339c0edbc28182dda95269db.cache reloaded, ttl=82012 [ select * from users where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): select a.* from users as a LEFT JOIN branch as b ON a.default_branch_id = b.id LEFT JOIN department as c ON a.default_department_id = c.id LEFT JOIN user_group as d ON a.group_id = d.id LEFT JOIN user_title as e ON a.title_id = e.id where a.company_id = '1' AND a.deleted = 0 order by status_id asc,last_name asc,first_name asc,middle_name asc
--------------------------------------------------------------------------------
/tmp/timetrex//4c/adodb_4c9dda71339c0edbc28182dda95269db.cache reloaded, ttl=82012 [ select * from users where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): select * from users where company_id = '1' AND id in ('1') AND deleted = 0 order by status_id asc,last_name asc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from users where company_id = '1' AND id in ('1') AND deleted = 0 order by status_id asc,last_name asc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SET AUTOCOMMIT=0
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): BEGIN
--------------------------------------------------------------------------------
/tmp/timetrex//8f/adodb_8fad02a0ca0445208f29b0128a30344a.cache reloaded, ttl=82012 [ select * from user_generic_data where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): select * from user_generic_data where user_id = '1' AND script = '/interface/timesheet/ViewUserTimeSheet.php' AND is_default = 1 AND deleted = 0 order by updated_date desc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select id,user_id,script,name,is_default,data,created_date,created_by,updated_date,updated_by,deleted_date,deleted_by,deleted,company_id from user_generic_data where id = 54
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): UPDATE user_generic_data SET IS_DEFAULT=0, UPDATED_DATE=1176217871 WHERE id = 54
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): update system_log_id_seq set id=LAST_INSERT_ID(id+1);
--------------------------------------------------------------------------------
/tmp/timetrex//9d/adodb_9de318fdf2fbe2b3a412623ab68b7c5a.cache reloaded, ttl=81998 [ select object_id,action_id,table_name,user_id,description,date,id from system_log where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): INSERT INTO system_log ( OBJECT_ID, ACTION_ID, TABLE_NAME, USER_ID, DESCRIPTION, DATE, ID ) VALUES ( 54, 20, 'user_generic_data', 1, 'User/Company Generic Data', 1176217871, 16771 )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select id,name,company_id,user_id,script,data,is_default,updated_date,updated_by from user_generic_data where id = 54
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): UPDATE user_generic_data SET IS_DEFAULT=1 WHERE id = 54
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): update system_log_id_seq set id=LAST_INSERT_ID(id+1);
--------------------------------------------------------------------------------
/tmp/timetrex//9d/adodb_9de318fdf2fbe2b3a412623ab68b7c5a.cache reloaded, ttl=81998 [ select object_id,action_id,table_name,user_id,description,date,id from system_log where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): INSERT INTO system_log ( OBJECT_ID, ACTION_ID, TABLE_NAME, USER_ID, DESCRIPTION, DATE, ID ) VALUES ( 54, 20, 'user_generic_data', 1, 'User/Company Generic Data', 1176217871, 16772 )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): COMMIT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): SET AUTOCOMMIT=1
--------------------------------------------------------------------------------
Smart Commit occurred
--------------------------------------------------------------------------------
(mysqlt): select * from user_date where user_id = '1' AND date_stamp = '2007-04-09 00:00:00' AND deleted = 0 ORDER BY id ASC
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select name FROM bread_crumb WHERE user_id = '1' AND name = 'My TimeSheet' LIMIT 1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): UPDATE bread_crumb SET url = '/interface/timesheet/ViewUserTimeSheet.php', created_date = 1176217871 WHERE user_id = '1' AND name = 'My TimeSheet'
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.*, c.date_stamp as user_date_stamp, b.note as note from punch as a, punch_control as b, user_date as c, users as d where a.punch_control_id = b.id AND b.user_date_id = c.id AND c.user_id = d.id AND d.company_id = '1' AND c.user_id = '1' AND c.date_stamp >= '2007-04-09 00:00:00' AND c.date_stamp <= '2007-04-15 23:59:59' AND ( a.deleted = 0 AND b.deleted = 0 AND c.deleted = 0 ) ORDER BY a.time_stamp asc, a.status_id desc, a.punch_control_id asc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp from user_date_total as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN over_time_policy as d ON a.over_time_policy_id = d.id where c.company_id = '1' AND b.user_id = '1' AND a.status_id = 10 AND a.type_id != 40 AND b.date_stamp >= '2007-04-09 00:00:00' AND b.date_stamp <= '2007-04-15 23:59:59' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp from user_date_total as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN over_time_policy as d ON a.over_time_policy_id = d.id LEFT JOIN absence_policy as e ON a.absence_policy_id = e.id LEFT JOIN punch_control as f ON a.punch_control_id = f.id where c.company_id = '1' AND b.user_id = '1' AND a.type_id != 40 AND b.date_stamp >= '2007-04-09 00:00:00' AND b.date_stamp <= '2007-04-15 23:59:59' AND a.status_id in (20,30) AND ( e.type_id is NULL OR e.type_id = 10 ) AND ( a.deleted = 0 AND b.deleted = 0 AND (f.deleted=0 OR f.deleted is NULL) ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc
--------------------------------------------------------------------------------
/tmp/timetrex//dd/adodb_dd09be64e8c914560e916f2c3cb3a58f.cache reloaded, ttl=82012 [ select * from premium_policy where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): select * from premium_policy as a where company_id = '1' AND deleted = 0 order by type_id asc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp from user_date_total as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN over_time_policy as d ON a.over_time_policy_id = d.id where c.company_id = '1' AND b.user_id = '1' AND a.status_id = 10 AND a.type_id = 40 AND b.date_stamp >= '2007-04-09 00:00:00' AND b.date_stamp <= '2007-04-15 23:59:59' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc
--------------------------------------------------------------------------------
/tmp/timetrex//21/adodb_211264a6147e22933fa0eba400f14039.cache reloaded, ttl=82013 [ select * from absence_policy where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): select * from absence_policy as a where company_id = '1' AND deleted = 0 order by type_id asc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp from user_date_total as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN over_time_policy as d ON a.over_time_policy_id = d.id where c.company_id = '1' AND b.user_id = '1' AND a.status_id = 30 AND a.type_id != 40 AND b.date_stamp >= '2007-04-09 00:00:00' AND b.date_stamp <= '2007-04-15 23:59:59' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp, d.severity_id as severity_id, d.type_id as exception_policy_type_id from exception as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN exception_policy as d ON a.exception_policy_id = d.id where c.company_id = '1' AND b.user_id = '1' AND b.date_stamp >= '2007-04-09 00:00:00' AND b.date_stamp <= '2007-04-15 23:59:59' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, d.type_id
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as date_stamp from request as a, user_date as b, users as c where a.user_date_id = b.id AND b.user_id = c.id AND c.company_id = '1' AND b.user_id = '1' AND a.status_id = 30 AND b.date_stamp >= '2007-04-09 00:00:00' AND b.date_stamp <= '2007-04-15 23:59:59' AND a.deleted = 0
--------------------------------------------------------------------------------
/tmp/timetrex//7e/adodb_7e11c77778220df214c467401c3e3cb6.cache reloaded, ttl=82013 [ select * from holidays where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): select distinct d.* from policy_group_user as a, policy_group as b, holiday_policy as c, holidays as d where a.policy_group_id = b.id AND b.holiday_policy_id = c.id AND c.id = d.holiday_policy_id AND d.date_stamp >= '2007-04-09 00:00:00' AND d.date_stamp <= '2007-04-15 23:59:59' AND a.user_id in ('1') AND ( c.deleted = 0 AND d.deleted=0 ) order by d.date_stamp desc
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.* from pay_period_time_sheet_verify as a where a.pay_period_id = '7' AND a.user_id = '1' AND ( a.deleted = 0 )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select * from pay_period where pay_period_schedule_id = '1' AND id < '7' AND deleted=0 ORDER BY id desc LIMIT 1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.* from pay_period_time_sheet_verify as a where a.pay_period_id = '6' AND a.user_id = '1' AND ( a.deleted = 0 )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select sum(total_time) from user_date_total as a, user_date as b where a.user_date_id = b.id AND b.user_id = '1' AND b.pay_period_id = '7' AND a.status_id = 20 AND ( a.deleted = 0 AND b.deleted=0 )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select sum(total_time) from user_date_total as a, user_date as b, absence_policy as c where a.user_date_id = b.id AND a.absence_policy_id = c.id AND b.user_id = '1' AND b.pay_period_id = '7' AND a.status_id = 30 AND c.type_id = 10 AND ( a.deleted = 0 AND b.deleted=0 )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select sum(total_time) from user_date_total as a, user_date as b, absence_policy as c where a.user_date_id = b.id AND a.absence_policy_id = c.id AND b.user_id = '1' AND b.pay_period_id = '7' AND a.status_id = 30 AND c.type_id = 30 AND ( a.deleted = 0 AND b.deleted=0 )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqlt): select a.type_id as type_id, a.over_time_policy_id as over_time_policy_id, sum(total_time) as total_time from user_date_total as a, user_date as b where a.user_date_id = b.id AND b.user_id = '1' AND b.pay_period_id = '7' AND a.status_id = 10 AND a.type_id not in ( 10, 40 ) AND ( a.deleted = 0 AND b.deleted=0 ) group by a.type_id, a.over_time_policy_id order by a.type_id, a.over_time_policy_id
--------------------------------------------------------------------------------
/tmp/timetrex//c2/adodb_c28808172d9b700c3d41d866ac596a9b.cache reloaded, ttl=82013 [ select * from over_time_policy where id = -1 ]
--------------------------------------------------------------------------------
(mysqlt): select * from over_time_policy as a where company_id = '1' AND deleted = 0 order by type_id asc,trigger_time desc