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 / Getting Started / October 2004



Tip: Looking for answers? Try searching our database.

find a value in a string (query)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Macromedia - 28 Oct 2004 21:50 GMT
I have a query that returns one field.  (ID)

For some reason I can not remember how to  find out if a particular number
is in that query.  I have tried this..

<cfloop from="1" to="#ListLen(rsGetSubCat)#" index="index" >
 <cfif #ListGetAt(rsGetSubCat,index)# = 6>
  Print stuff
 </cfif>
</cfloop>

But that is not working.  I am getting an invalid construct error.

Help please.

Thanks!
Chris
Signature

Chris Luksha
Echo Web Services
Making Your Website Resound
www.echowebservices.com

Chris Luksha - 28 Oct 2004 22:14 GMT
I got it- Thanks all....

<cfset cats = ValueList(rsGetSubCat.prdt_scnd_rel_ScndCat_ID)>
<cfset temp = ListFind(cats,"6")>
<cfif temp NEQ 0>
  Print yankee stuff
</cfif>

A little WACK can go a long way :)

Signature

Chris Luksha
Echo Web Services
Making Your Website Resound
www.echowebservices.com

>I have a query that returns one field.  (ID)
>
[quoted text clipped - 13 lines]
> Thanks!
> Chris
 
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



©2009 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.