make sure when you put values in the "seeking" column to add a comma before
and after the list. So a list of "1,2,3" becomes ",1,2,3,"
That way when you run the query you can say:
WHERE seeking LIKE '%,2,%'
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
TeleCommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
"Let's Roll"
- Todd Beamer, Flight 93
-----Original Message-----
From: Double Down, Inc. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 1:05 PM
To: CF-Talk
Subject: Query Question
I have this statement in a query:
(<cfloop index="ii" list="#form.seeking#" delimiters=",">seeking LIKE
'%#ii#make %'<cfif NOT listlast(form.seeking, ",") is ii> and
</cfif></cfloop>
It will select the record if the field (a comma delimitated list) has the
value (the values are number). The problem I am having is that if I want to
pull the records that contain the number 2, it is giving me the records that
contain 2, 22, 23, etc. etc. How do I set this up so it will pull ONLY the
records that have the number 2 in it?
TIA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm