in a large database.
Nick
-Original Message-
From: Chris Geanious [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 5:01 AM
To: CF-Talk
Subject: Looping through lists
Greetings,
Am constructing a db search using (among other things) a form text area for
keywords. In the data base
Why not use Verity ?
-Original Message-
From: Chris Geanious [mailto:[EMAIL PROTECTED]]
Sent: 22 August 2001 05:01
To: CF-Talk
Subject: Looping through lists
Greetings,
Am constructing a db search using (among other things) a form text area for
keywords. In the data base
Interesting,
Chris, I usually use SQL statment as the following:
SELECT * FROM dbname
WHERE keywords LIKE '%#FORM.QUERY#%'
That means, select all columns from dbname where
keywords field contains the value of #FORM.QUERY#.
% signs means, any set of charachters
Regards,
Hamid Hossain
---
On 8/21/01, Chris Geanious penned:
Greetings,
Am constructing a db search using (among other things) a form text area for
keywords. In the data base there is a KeyWords field which contains a
comma delimited list of keywords for each entry.
I have a query which loops over the form text box
On 8/22/01, Bud penned:
Then:
WHERE somefield = '#somevalue#' and
(cfloop index=mycriteria list=#criteria#
OOPS. Extra ( ---(keywords LIKE ',#Trim(mycriteria)#,' OR/cfloop 0=1)
Take that out and try it. :)
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
AM
To: CF-Talk
Subject: RE: Looping through lists
Chris,
This isn't what you want to hear, but really your database design
needs changing so that each keyword is in a separate row.
If that's not an option, you could read the list of keywords
and do a ListFindNoCase
Subject: Looping through lists
Greetings,
Am constructing a db search using (among other things) a form text area for
keywords. In the data base there is a KeyWords field which contains a
comma delimited list of keywords for each entry.
I have a query which loops over the form text box entries
, August 22, 2001 5:01 AM
To: CF-Talk
Subject: Looping through lists
Greetings,
Am constructing a db search using (among other things) a form text area for
keywords. In the data base there is a KeyWords field which contains a
comma delimited list of keywords for each entry.
I have a query which
- Original Message -
From: Chris Geanious [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 8:58 AM
Subject: RE: Looping through lists
Hi Nick and all who have responded,
Thanx for the input. I am sure I will be able to make this work with all
your help.
I
Greetings,
Am constructing a db search using (among other things) a form text area for
keywords. In the data base there is a KeyWords field which contains a
comma delimited list of keywords for each entry.
I have a query which loops over the form text box entries. How do I then
loop over
ssage-
From: Jon Tillman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 01, 2000 10:17 AM
To: [EMAIL PROTECTED]
Subject: Re: Looping through lists
I have two lists, listProducts and listQuantity. I want to do the
following:
For each productID in listProducts, do a search that returns al
Hi Jon,
Jon Wrote:
|Hey, I need to figure out how to loop though a list and
|perform a query for
|each value returned in the list. Any ideas?
You can get a query to select all the records with an entry contained in a
comma delimited list so:
cfquery name="select_text"
SELECT stuff FROM
On Tue, 01 Aug 2000, peter spewed forth into the void:
CFLOOP LIST="#myListOfValues#" INDEX="currItemInList"
CFQUERY NAME="performTrivialFunctionInLife" DATASOURCE="..."
select *
from stillAtWork
where somevalue = #currItemInList#
and salary #peanuts#
order by
So, what if I wanted to do the following:
create a loop that would take two lists, perform the query on all the values
in one of them, output the formatted results of those queries, but insert the
values from the second list, one for each query returned?
On Tue, 01 Aug 2000, Anthony Geoghegan
ist,id,))# #some_col#
/cfoutput
ugly but ...
~justin
- Original Message -
From: "Jon Tillman" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 01, 2000 4:53 PM
Subject: RE: Looping through lists
So, what if I wanted to do the following:
create a loop that
On Tue, 01 Aug 2000, JustinMacCarthy spewed forth into the void:
Assuming you have
namelist = "tom,dick,harry"
IDlist = "1,2,3"
and you want to
select id, some_col from table where id in (#idlist#)
output is
id some_col
2 textorsomething
3 textorsomething
I have:
productlist = "1,2,3,4"
quantitylist = "2,1,1,1"
and i want to
SELECT tblProduct.*,
tblProductSize.productsizeSize,
tblProductWeight.productweightWeight,
tblProductColor.productcolorColor
FROM((tblProduct
Hey, I need to figure out how to loop though a list and perform a query for
each value returned in the list. Any ideas?
--
This Email is 100% Virus Free! How do I know?
Because no Microsoft products were used to
generate it!
:::
Jon
TPUT QUERY="performTrivialFunctionInLife"
#xyz#br
/CFOUTPUT
/CFLOOP
- Original Message -
From: "Jon Tillman" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 31, 2000 10:50 PM
Subject: Looping through lists
Hey, I need to figure out how to loop though a list a
19 matches
Mail list logo