Not  bad idea.  I'd ask that you please log a ticket for this request.

Thank you,

Doug Hughes, President
Alagad Inc.
[EMAIL PROTECTED]
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836


On Wed, Oct 29, 2008 at 1:18 PM, Chris Blackwell <
[EMAIL PROTECTED]> wrote:

> I've just run into a problem using reactor OO queries to select data from a
> table.
> I'm trying to do "WHERE colA = x OR colB = x", however the generated sql
> uses maxlengths in the cfqueryparams so if x is longer than colA or colB
> then an error is thrown
>
> SELECT  `Customer`.`CustomerId` FROM `Customer`
> WHERE (
>       `Customer`.`Email` LIKE <cfqueryparam cfsqltype="cf_sql_varchar"
> maxlength="257"  value="#arguments.Query.getValue(1)#%" />
> OR `Customer`.`ZipCode` LIKE <cfqueryparam cfsqltype="cf_sql_varchar" *
> maxlength="12"*  value="#arguments.Query.getValue(2)#%" />
> OR `Customer`.`LastName` LIKE <cfqueryparam cfsqltype="cf_sql_varchar"
> maxlength="257"  value="#arguments.Query.getValue(3)#%" />
> OR `Customer`.`CompanyName` LIKE <cfqueryparam cfsqltype="cf_sql_varchar"
> maxlength="257"  value="#arguments.Query.getValue(4)#%" />
> )
>
> The query is for a really simple customer search, but as you can see
> because zipcode is only 12 char long i'm getting an error if you enter a
> long surname to search for.
>
> can maxlength parameters only be added to cfqueryparams when inserting
> data?
>
> Cheers, Chris
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> Reactor for ColdFusion Mailing List
> [EMAIL PROTECTED]
> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to