Tracking employee data
Definitely not. You can do that all in a single query.

SELECT employeename, DATE(reattemptdate) as date, COUNT(*) as count
    FROM orders
    WHERE employeename in ('name1', 'name2', 'name3', '...')
        AND DATE(reattemptdate) &gt; DATE(NOW() - INTERVAL 7 DAY)
    GROUP BY employeename, date


This will give you data in the form of

name1 | 2018-09-05 | 5
name1 | 2018-09-06 | 7
name1 | 2018-09-07 | 12
name1 | 2018-09-08 | 9
name1 | 2018-09-09 | 22
name2 | 2018-09-05 | 3
name2 | 2018-09-06 | 5
name2 | 2018-09-07 | 9
name2 | 2018-09-08 | 11
name2 | 2018-09-09 | 16
...


All you need is to iterate over the data.

Of course you can drop the employeename in ('name1', 'name2', 'name3', '...') condition if you want to search over ALL employees and not just "specific n" ones.