You're right Ben. That fixed it!. 

It was an old script I wrote many moons ago.

Robert O.

 -----Original Message-----
From:   Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent:   Thursday, April 20, 2006 11:04 AM
To:     CF-Talk
Subject:        RE: Comma added

Robert,

This might happen if you were submitting the form field in two different
places (like a hidden value as well)... The comma would be CF's attempt to
pass the two values in as a list (comma delimited). 

Also, are you doing any sort of pre-page processing that might alter form
fields??

Try putting in a CFDump on the FORM at the top of the processing page, see
what is actually passed via the FORM. 

........................
Ben Nadel 
www.bennadel.com

-----Original Message-----
From: Orlini, Robert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 20, 2006 11:01 AM
To: CF-Talk
Subject: Comma added

Every since I switched to CF 7 my code seems to add a comma in front of some
fields when it does a search. See my code below. I don't have this in the
Access dbase nor in my script. Is there an issue with CF 7? Are there any
fixes or updates that address this?

This problem cause searches to fail because its looking for ",NJ", for
example, and not just "NJ".

Any workaround?

Thanks

Robert O.
HWW

My query displayed in debug:

Getcustomer (Datasource=wweb, Time=0ms, Records=0) in
D:\Inetpub\Intranet\Searchforms\wwebsearch\getwwebsearch.cfm @ 10:54:02.002
SELECT * FROM wweb where 0 = 0 And customer LIKE '%'
And Institution LIKE '%'
And State = ',AL'
And country = ',0'                                              
ORDER BY ID DESC

Code in script:

<CFIF IsDefined("FORM.customer")> 
        And customer LIKE '#FORM.customer#%'
</CFIF>
<CFIF IsDefined("FORM.Institution")>
        And Institution LIKE '#FORM.Institution#%'
</CFIF>
<CFIF FORM.State NEQ 0>
        And State = '#FORM.State#'
</CFIF>
<CFIF FORM.country NEQ 0>
        And country = '#FORM.country#'

</CFIF>
ORDER BY ID DESC
</cfquery>






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238298
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to