Get the unmatched user clockin vs user table The user table contains users' information. The clock_in table contains the clockin of the users every day. I have been trying to check who is absent or not yet clocked in. 

For example by 9:00 am, I should be able to check who has not clocked in yet. I have came up with the MySQL query and this what I have come up with so far after about 7 days now searching. The idea is to compare the user table to the users clockin today, if there is an unmatched (IS NULL) then that user has not clocked in today. Here is my updated query so far.

SELECT users.* 
FROM users  
LEFT OUTER JOIN timecard  
  ON users.id = timecard.employment_id 
AND timecard.date='".$today."'
WHERE timecard.employment_id IS NULL and user.location = '".$location."' 
ORDER BY users.dept DESC


Please, I know Left Outer Join may be the right one according to the results of my search, need your advice
The best solution is something like this:

CREATE TABLE personnel (id INTEGER, name VARCHAR(30));


populate it:

INSERT INTO personnel VALUES (1, 'Joe'), (2, 'Mary'), (3, 'Bill'), (4, 'Fred');


Create and populate the timecard table:

CREATE TABLE timecard (empid INTEGER, clockin_time DATETIME);

INSERT INTO timecard VALUES (1, '2019-08-28 08:00:18');
INSERT INTO timecard VALUES (2, '2019-08-28 08:00:28');
INSERT INTO timecard VALUES (3, '2019-08-28 08:00:28');
INSERT INTO timecard VALUES (1, '2019-08-29 08:00:03');
INSERT INTO timecard VALUES (4, '2019-08-29 08:04:04');


Note that only Joe and Fred have clocked in on the 29th of August - Mary and Joe haven't.  

You can find the fiddle here.

So, first run this query to determine who clocked in on the 29th.

SELECT p.id AS the_id -- , p.name, t.empid -- remove -- to see results - shows thought process!
FROM timecard t
LEFT JOIN personnel p
  ON t.empid = p.id
WHERE DATE(t.clockin_time) = '2019-08-29'
ORDER BY p.id, t.clockin_time;


Result:

the_id
     1
     4



So, we see that Joe (id 1) and Fred (id 4) have clocked in.

Now, we need to find out the identities of those who didn't clock in. This is the list of people whose id's are not in the result of the first query. We obtain this by doing the following:

SELECT * FROM personnel pl
WHERE pl.id NOT IN
(
  SELECT p.id AS the_id
  FROM timecard t
  LEFT JOIN personnel p 
    ON t.empid = p.id
  WHERE DATE(t.clockin_time) = '2019-08-29'
  ORDER BY p.id, t.clockin_time
);



Result:

id  name
 2  Mary
 3  Bill


Something like this is probably what you require - if not, let me know. This construction allows you to do tallies of how many times person with id x was absent in a given month, day, using BETWEEN and lots more.... fun for all the family! :-)