Zergman Posted July 30, 2008 Share Posted July 30, 2008 The application I need to build is basically a time tracker. The users will use this to log times throughout the work day where they are not doing their normal scheduled work. This is what i've come up with so far. 1) table is setup with a StartTime, EndTime, Notes, date, Username columns. - Both time colums are set to TIME in mysql for format ... not sure if this is the right way to go - Notes is set to LONGTEXT since im not sure how much info they will put in 2) Insert form is using drop menus for entering the start and end time. Im sure this isn't the best solution Points im not sure on is; - how the users will enter the times ... need it to be quick and easy - how to store the times in the database and what column format is best - easiest way to allow the users to search and display the times for a given day Quote Link to comment https://forums.phpfreaks.com/topic/117315-time-tracker-application-suggestions/ Share on other sites More sharing options...
corbin Posted July 30, 2008 Share Posted July 30, 2008 - how the users will enter the times ... need it to be quick and easy Hrmmm. You could have some kind of Javascript clock. Or, they could have an input box, and you could just use strtotime, assuming the people using the page aren't too dumb to enter an understandable date. - how to store the times in the database and what column format is best I would probably go with unix timestamps (number of seconds since Jan 1, 1970 00:00 GMT). - easiest way to allow the users to search and display the times for a given day If you went with a unix timestamp, you could simply do something like: SELECT * FROM time_tracked WHERE StartTime >= $day AND EndTime < $day2 That would be where $day is the day you're searching for at 00:00, and $day2 would be $day + 24*60*60. DATETIME columns might actually be better, but I'll let you google and decide. Quote Link to comment https://forums.phpfreaks.com/topic/117315-time-tracker-application-suggestions/#findComment-603839 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.