Forums
This topic is locked
PHP Date Search
Posted 16 May 2005 22:18:49
1
has voted
16 May 2005 22:18:49 Noel Stratton posted:
I am setting up a page that will display results by month. My first page will ask the user which month to display results. I am not sure where to start on the results page to show only the records from the month selected. Any suggestion? For example the user would select September 2004. The results page would show all records that have a date of 2004-09-01 to 2004-09-30 Replies
Replied 24 Jun 2005 18:40:31
24 Jun 2005 18:40:31 Noel Stratton replied:
I guess I will reply to my own post since I got it working. The first page has a date range. So start_date in one form field name and end_ date is the form field name. the second page has a recordset like this:
select * from table where start_date between 'colname' AND 'colname2'
Then below in the variables have colname and _$GET[start_date]
colname2 and _$GET[end_date]
select * from table where start_date between 'colname' AND 'colname2'
Then below in the variables have colname and _$GET[start_date]
colname2 and _$GET[end_date]