In Reply To:
$in{'sb'} = 2; # Number of your date field
is the number of the field that holds the date the record was added. Change 2 to match the number of the field.
Okay, that makes more sense.
In Reply To:
You may need to change
$in{'Date-gt'} = $new;
to match the name of your field. If your date field is called date then change the line to
$in{'date-gt'} = $new;
It has to match.
Okay, that was one bug knocked out - I have two date fields: one saying "Added:" and another saying "Last Updated:"; I use the Added one so I changed
$in{'Date-gt'} = $new; to
$in{'Added-gt'} = $new;.
Is that right?
Also, I found another problem - if you have no records, it doesn't display a screen saying "No new records" or something to that effect; it shows you that "search failed" screen. Would it be possible to show a page saying "No new routes have been added in the last 30 days." if no new routes are added within those thirty days instead of the "Search Failed" screen?
I think it might be possible if you put something like this: First, in the sub html_view_failure, determine if or if not 'listnew' is in the query string. Then, if not, continue through the current subroutine. And if so, then quit this subroutine and go to a new one (possibly sub html_no_new) which prints "No new routes have been added in the last 30 days."
Thoughts?
Thanks,
Michael DeLong