Jump to content

Help with records


samona

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.