Julia Green wrote:
> 
> Now the problem, my client wants me to do a form where you put a Beginning and 
>Ending Date, 
> Beginning Date:<br>
> <CFINPUT TYPE="text" NAME="Clock1" SIZE="20"><br>
> Ending Date:<br>
> <CFINPUT TYPE="text" NAME="Clock2" SIZE="20"><br>
> 
> <P><CENTER>Type the dates in the following format:  10/13/2001.  Be sure to type a 
>beginning and ending date.<BR>
> <p><INPUT TYPE="submit"VALUE="Search"></CENTER></P>
> and to find the files that go with these dates, but for instance, if I enter 5/6/01 
>or 
> 5/6/2001
> and 12/6/01, it returns the 02 dates, all between 5/6/2002 and 12/6/2002.
> So remember tblfile4d has date format for Clock for all the dates now.
> It is called gilsrch.cfm posts to gildate2.cfm with this relevant code:
> <CFQUERY NAME="gilwayc"  DATASOURCE="cgi2">
> 
> SELECT count(t.File) as file3, t.Clock, g.File, t.File
> FROM tblfile4d t, gilway12 g
> WHERE Clock BETWEEN #CreateODBCDate(Form.Clock1)# AND #CreateODBCDate(Form.Clock2)#
>   AND t.File=g.File
>   GROUP BY g.File, t.File, t.Clock
>   ORDER BY file3 DESC
>  
> </CFQUERY>

I don't see any problem with this code (but it does need error 
checking/input validation). Have you tried enabling the debug output so 
you can see what exactly is sent to the database?

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to