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 291185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:03:58+00:00 2026-05-12T06:03:58+00:00

SO I’m working on a schedule app that uses a MySQL DB. One of

  • 0

SO I’m working on a schedule app that uses a MySQL DB. One of the modules for this site is for managers to track tardiness, overtime, and absents. The current site is a mess. It just has the manager enter in the key data, but it doesn’t bind the manager to any of the already known data (like when the employee was expected to arrive/leave) or even require them to use a standard format. Some managers enter 30 minutes (meaning 30 minutes late), while others might enter 8:30 (meaning they were due in at 8:00), etc, etc.

My version will be much more limiting. The manager will choose the employee, then choose the shift in question, and they basically will be able to enter two values: time actually arrived, time actually left. This way, when reports are run and timesheets are verified, it is simply a matter of doing the math to see if they were late/early/overtime. But I’ve run into a tough spot:

First, if someone calls in sick (or just doesn’t show up), I will have it so the manager just checks a box for that, and they don’t make any time adjustments at all. It just blacks out that time altogether. Should I do this by setting both time values to NULL, and when any queries are run, NULL will be dealt with as need be (perhaps reversing the time left and time arrives so it comes out to zero on both ends), OR should I have both time arrived and time left both set to the “expected shift end” time, so that it works out to zero?

I don’t like using NULL because it just feels like there is no data available, but I don’t like using the expected shift end because it makes it seem as though they really did arrive, just right as they were also leaving.

This is really a question of how to make the data semantic without having to make it overly complicated (with a NULL).

  • 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-05-12T06:03:58+00:00Added an answer on May 12, 2026 at 6:03 am

    How about creating a separate table (ShiftTimes?) that contains an identifier for the employee, an identifier for the shift (possibly the date but that won’t work for 3rd shift), and the enter and exit times. This way if the employee calls out there simply won’t be a record in the table for that day.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 273k
  • Answers 273k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer if the two parties know that already and agree that… May 13, 2026 at 2:04 pm
  • Editorial Team
    Editorial Team added an answer You just need to set the related drawables and set… May 13, 2026 at 2:04 pm
  • Editorial Team
    Editorial Team added an answer #include <libgen.h> #include <sys/stat.h> ... struct stat statbuf; if (stat(dirname(argv[1]),… May 13, 2026 at 2:04 pm

Related Questions

I want use html5's new tag to play a wav file (currently only supported
In order to apply a triggered animation to all ToolTip s in my app,
this is what i have right now Drawing an RSS feed into the php,
I have text I am displaying in SIlverlight that is coming from a CMS
I have a French site that I want to parse, but am running into

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.