samona Posted July 11, 2008 Share Posted July 11, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/114300-help-with-records/ Share on other sites More sharing options...
craygo Posted July 11, 2008 Share Posted July 11, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/114300-help-with-records/#findComment-587845 Share on other sites More sharing options...
samona Posted July 11, 2008 Author Share Posted July 11, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/114300-help-with-records/#findComment-587867 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.