Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8461531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:54:23+00:00 2026-06-10T13:54:23+00:00

I have a timesheet and several people use it users has the username and

  • 0

I have a timesheet and several people use it

users has the username and id of the user, this is lined to timesheet which stores the date and user_id, user_id and id are the link so table 2 might have a new entry for everyday.

Now what im trying to do is gather a list of people who havent updated their timesheet for today. Here is my newbie attempt

select * from users left join timesheet ON users.id =
timesheet.user_id WHERE timesheet.user_id is null AND timesheet.value
is null

This returns all the users who dont have a timesheet entry which is perfect but im querying a specific day so if they filled it out yesterday theyll have a corresponding entry in timesheet but it still means they havent filled it out today.

I tried

select * from users left join timesheet ON users.id =
timesheet.user_id WHERE timesheet.user_id is null AND timesheet.value
is null AND timesheet.date != ’12-09-05′

I can see the flaw in that logic, i already excluded the people i want to further filter by date but i cant get my head around how to get the result i want. I really want it to filter by date first and then run that querybut im not sure how to do that as im not too familiar with MySQL and google said he didnt know the answer

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:54:25+00:00Added an answer on June 10, 2026 at 1:54 pm

    Move the date condition to the ON clause:

    SELECT * FROM `users`
      LEFT JOIN `timesheet`
         ON `users`.`id`=`timesheet`.`user_id` AND `timesheet`.`date`=CURDATE()
      WHERE `timesheet`.`user_id` IS NULL AND `timesheet`.`value` IS NULL
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a accepts_nested_attributes_for association between timesheet and timesheetlines. This works great, but when
have written this little class, which generates a UUID every time an object of
I have a application which is on timesheet. I have total of 54 columns
I have a table say Timesheet, which is having one week hour entry stored
I currently have a document database and a timesheet database. Users book by generic
I'm creating a small timesheet application. Timesheets have athletes, and each athlete has personal
I have worked on a timesheet application application in MVC 2 for internal use
I have a timesheet table and a department table with date ranges and want
The issue: I have a timesheet application. It has an SQlite database. I am
This may be complicated to explain. I have set up a timesheet system where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.