Jason Smith wrote:
> This code works fine with a access database, since converting the entire cf
> application to a live SQL database it has been the beginning of a
> nightmare. I'm not real familiar with access but it seems they have some
> really strange ways to check dates and whatnot.
>
> <table class="rightMenu">
> <tr>
> <td class="rightMenu"
> style="text-align: left;"><br><br>
> <cfset theMonth =
> datePart("m", now())>
> <cfset theYear =
> datePart("yyyy", now())>
> <cfquery
> name="getMonthlyPurchase" datasource="#DS#"
> cachedwithin="#CreateTimeSpan(0,4,35,0)#">
> SELECT
> Sum(tblItemPurchase.itemPurchasePrice) AS totalMonthlyPurchase
> FROM tblItemPurchase
> WHERE
> tblItemPurchase.itemPurchaseDate >= ###theMonth#/1/#theYear###
> </cfquery>
Use cfqueryparam
Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187131
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54