Re: Not Able to Get Trim Function to Work

2010-01-25 Thread Peter Boughton

What Justin should have put was this:

WHERE somefield = 

Always use cfqueryparam for user-supplied query values!


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330117
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Not Able to Get Trim Function to Work

2010-01-25 Thread Justin Scott

> I have tried multiple combinations using the trim function, but
> none of them work.

It looks like you're putting the trim() on the value attribute of the input
field.  How about the value you pass into the query?  This should work:

select fields from table where
somefield = '#trim(form.field)#'

You want to trip spaces on your search query in addition to trimming when
you re-display the form.


-Justin



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330109
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Not Able to Get Trim Function to Work

2010-01-25 Thread Steve LaBadie

I have tried multiple combinations using the trim function, but none of
them work. If I put a trailing space at the end of the search, I get no
record found. If there is no trailing space, the record is produced. I
would appreciate any guidance you can give.

 

I have tried:

value="#Trim(fldname)#"

value="#Trim(fldname)#"

value="#Trim(FORM.fldname)#"

 

 









 



Name (1st or last)

mail

 

Thanks,

 

Steve LaBadie, Web Manager

East Stroudsburg University

200 Prospect St.

East Stroudsburg, Pa 18301

570-422-3999

http://www.esu.edu  

slaba...@po-box.esu.edu  



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330108
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4