Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / September 2007



Tip: Looking for answers? Try searching our database.

Problem with listQualify

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
EndoplasmicReticulum - 20 Sep 2007 21:02 GMT
I have a dropdown list box on the form page that is populated with a number of
units, some single words, some multiple words with spaces and some contain
commas like this: AUG,ABN BCT

I am using MS SQL Server200 and when I pass in the list to run the query I'm
using listQualify in the where clause
like this:   and unit in (#listQualify(units,"'")#)

It will not find the units that the user selected that have a comma  in them.

How can I fix this?
Ian Skinner - 20 Sep 2007 21:10 GMT
A <cfqueryparam value="#units#" list="yes"...> tag?  It handles the
qualification for you.

Check the actual formated SQL sent to the database with any of the
available debugging features?
EndoplasmicReticulum - 21 Sep 2007 12:46 GMT
Thanks for the reply.

However, cfqueryparam isn't helping.

I need a comma delimited list for the where clause but sometimes the list
values contain a comma within it. So when the query runs it separates AUG
from ABN BCT because there is a comma in it. I need the query to see
?AUG,ABN BCT? as a single list value.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.