Mysql LEFT JOIN table filter original table properly

So i have following tables. As you can see it all works amazing.!9/e19e5/1

My issue is that i’d like to be able to filter by user_id on the punch_clock table.

When i add AND user_id = 3; to the end of the sql statement it doesn’t show the empty results..

What is the best way to achieve this?


Source: php

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.