Jump to content

Recommended Posts

Hi, I need some help.  I'm trying to write a program that will display forms submitted the current date and forms submitted the previous day.  However, when a form has not been submitted for a day, I want to be able to insert zeros as values. 

 

Now in the program I retrieve records by querying the last two forms entered.  That way, I don't have to worry about weekends and holidays.  Any ideas on how to solve the problem of incomplete forms?

Link to comment
https://forums.phpfreaks.com/topic/114300-help-with-records/
Share on other sites

Are you going to look at this everyday?? If so you can query it before anything is outputted and fix the inserts. If you want it to be automated you would have to create a script which can be run as a cron job. have a date field and check that there is a date entered for everyday and insert the "0" for dates that are missing.

 

Ray

Link to comment
https://forums.phpfreaks.com/topic/114300-help-with-records/#findComment-587845
Share on other sites

We will be looking at this everyday except weekends and holidays.

 

I was thinking that maybe if I check whether there is one form filled.  If there is, then it is not a weekend or holiday, so if any forms weren't submitted then 0's will be inserted. 

 

You foresee any problems with this?

Link to comment
https://forums.phpfreaks.com/topic/114300-help-with-records/#findComment-587867
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.