let's say.. mynumber = 2 ans mylist = 2,67,34,52
cfIf listFind(myList,'2') = 0 ...
You were very, very close. :)
cfIf listFind(myList,'2') IS 0
You were very, very close as well :D
Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
Correct me if I'm wrong here people, but I believe that if the
list contains actual numbers (like from a numeric data field)
then this list function will work correctly, but if it's a text
string it won't.
It's been a while since I checked on this.
ListContains looks to see if any entries
I need know if a number is one of a list item.
let me explain
let's say.. mynumber = 2 ans mylist = 2,67,34,52
I thought this would do ..
cfif #listcontains(mylist, mynumber)# is 0
...
cfelse
...
/cfif
but it does not act like I want ... It compare the same whay as of strings
and will find 2
cfif listfindnocase('#mylist#','#mynumber#',',') NEQ 0
Not in list
/cfif
-Original Message-
From: Gilles Ratte [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 07, 2000 10:52 AM
To: 'cftalk'
Subject: contained in a list
I need know if a number is one of a list item.
let me explain
let's
Try ListFind
At 10:51 AM -0400 7/7/2000, Gilles Ratte wrote:
I need know if a number is one of a list item.
let me explain
let's say.. mynumber = 2 ans mylist = 2,67,34,52
I thought this would do ..
cfif #listcontains(mylist, mynumber)# is 0
..
cfelse
..
/cfif
but it does not act like I
let's say.. mynumber = 2 ans mylist = 2,67,34,52
cfIf listFind(myList,'2') = 0 ...
You were very, very close. :)
Brandon Whitaker
[EMAIL PROTECTED]
---
"It'll get used by the same people using Opera. People dressed in black
wearing berets."
- Dave Watts, on Mozilla
"It makes you feel so
]
Sent: Friday, July 07, 2000 10:52 AM
To: 'cftalk'
Subject: contained in a list
I need know if a number is one of a list item.
let me explain
let's say.. mynumber = 2 ans mylist = 2,67,34,52
I thought this would do ..
cfif #listcontains(mylist, mynumber)# is 0
...
cfe
'
Subject: contained in a list
I need know if a number is one of a list item.
let me explain
let's say.. mynumber = 2 ans mylist = 2,67,34,52
I thought this would do ..
cfif #listcontains(mylist, mynumber)# is 0
...
cfelse
...
/cfif
but it does not act like I want ... It compare the same whay
--
-Original Message-
From: Gilles Ratte [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 07, 2000 7:52 AM
To: 'cftalk'
Subject: contained in a list
I need know if a number is one of a list item.
let me explain
let's say.. mynumber = 2 ans mylist = 2,67,34,52
I thought
d be to have the list start and end with a comma.
There may be a more elegant way to do this using sql.
-Original Message-
From: Gilles Ratte [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 07, 2000 10:52 AM
To: 'cftalk'
Subject: contained in a list
I need know if a number is one of a lis
10 matches
Mail list logo