Stuart,
I'm surprised no one has mentioned it yet, but I wouldn't recommend storing
a list in your database. I'd recommend figuring out the normalized way to do
it. I'm a bit confused as to what you're really storing. Is it that one
article is related to other articles?
Back to the question at
Hi Deanna,
This morning I just worked out what i had done wrong! It was that I had been
putting the option value=#articleID# and not option value=#authorID# with
my initial form.
Each article when CREATED the user gets a chance to link to other related
articles. Once these articles are
or not they had any associated articles.
- Original Message -
From: Stuart Kidd [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, November 16, 2004 7:32 AM
Subject: Re: List Contains
Hi Deanna,
This morning I just worked out what i had done wrong! It was that I had
been
I'm surprised no one has mentioned it yet, but I wouldn't recommend storing
a list in your database.
This is absolutely true, at least in theory, I mean as a database issue only.
But when the number of elements in the list is finite and reasonabily small,
and every element in the list is also
in the article table, and their associated
articles, whether or not they had any associated articles.
- Original Message -
From: Stuart Kidd [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, November 16, 2004 7:32 AM
Subject: Re: List Contains
Hi Deanna,
This morning I
you're doing it.
- Original Message -
From: Stuart Kidd [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, November 16, 2004 9:28 AM
Subject: Re: List Contains
My knowledge of databases isn't too deep. Am I right to say that i would
have a table called articleRelationship
articleID - articleRelations
1 3,14,33
2 3,4,12
3 11,1,2
4 7,8,5
5 7,8
The problem with this, is 1) that you're still storing a list, and 2) you will
have either redundant or inconsistent information. Meaning, article 1 says it
is related to 3, and 3 says it is
Hi guys,
I'm having problems with lists.
I displayed a list of all article titles (and IDs) that could relate to a
specific title and the user can select which ones can be links (via a select
form).
That part is all good and it inserts the comma separated list into the field
articleRelatedLinks
You are almost there. Two problems.
First, you are going to want listFind, rather than listContains, I think.
listContains is not an exact match. looking for 5 will find 5 and 35 and
50.
Second, are there really spaces after the , in the list? If so, I think you'll
want to get rid of them. 5
Looks like you need ListFind(), not ListContains().
ListFind looks at the entire element, while ListContains looks at
substrings.
cfset myList=21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6
ListFind(myList,7) will return 15
ListContains(myList,7) will return 5 (which is the element 17)
---
Thanks for your help Jerry and Al!
I'm still having that problem where it only finds a few of the numbers in
the list. The field is set as a varchar(200) that shouldn't be a problem
should it?
I broke the code down so it's easier to read and only specifically targets
one particular row (just
In a product display page I need to show color swatches based on only those
colors
a particular product has available, rather than showing all color swatches
in my swatch image directory.
(Entire code set and table creation code at bottom of this email)
EXPLANATION:
I have two lists -
One is
they are always jpgs and append that where you're
outputting #i#.
John Burns
-Original Message-
From: Alan Bleiweiss [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 06, 2004 4:16 PM
To: CF-Talk
Subject: Problem only showing swatches if list contains a swatch name
In a product display page I
[mailto:[EMAIL PROTECTED]
Sent: Thursday, May 06, 2004 4:16 PM
To: CF-Talk
Subject: Problem only showing swatches if list contains a swatch name
In a product display page I need to show color swatches based on only
those colors a particular product has available, rather than showing all
color
Burns
-Original Message-
From: Alan Bleiweiss [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 06, 2004 5:45 PM
To: CF-Talk
Subject: RE: Problem only showing swatches if list contains a swatch
name
When I use this code, I get no match results, and doing a dump shows me
that the only list-item
15 matches
Mail list logo