Paul Giesenhagen wrote:
> 
> We ran into this problem on MySQL 3.23.54 / Linux

> <cfparam name="url.id" default="">
> 
> SELECT columns....
> FROM table
> WHERE id = <cfqueryparam value="#url.id#" cfsqltype="CF_SQL_VARCHAR">
> 
> Now if no url.id isn't passed, it errors out not liking the '?" in the WHERE 
> statement ... if you put ' around the '<cfqueryparam>' it runs just fine ....

Bug in MySQL. It incorrectly converts '' to '0' and then to 0. It should 
throw an error regardless of whether there are single quotes around it.

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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to