Why am I having so many issues with trying to use cfqueryparam on a mysql
date field. I'm trying to return the archive of content for a givin year
2007 and the only way to add a queryparam to it is varchar. Seems like this
isn't the best option anyone have an idea of a better queryparam to use?

The filed in the Database is DATETIME

problem area of my query

AND YEAR(DateField) = #URL.Archive#

This also works

AND YEAR(DateField) = <cfqueryparam cfsqltype="cf_sql_varchar"
value="#URL.Archive#">

Is there anything else I can use here? I want to use "cf_sql_date" I've
tried doing createdate, datepart and the like, the query returns no results
unless I run it as cf_sql_varchar or no queryparam at all.

Seems kinda odd but then again, the dam date field in mysql is wack anyway.
I'm always having troubles with it and checking mysql documentation never
helps, its like it was made by monkeys.

Casey


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270262
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to