Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
CadenTerrik #1
CF Search/Array help
Hey all, quick question, any help will be terrific...
Alright, so I have a verity search going...CF 6.1, it all works no
problem...what I want to do is orginize the data into categories...so, it's
searching under database fields of name, topic and category...i'd like to make
my output look like
Name:
Result
Result
Result
Topic:
Result
Result
Result
Category:
Result
Result
Result
And I haven't found an easy to way to do that...so what I did was split my
index into 3 seperate indexes...specifically searching under name, topic and
result...now, what i'm trying to do is pull the "key" using the cfsearch
function to then query the database and get the rest of the data.
So ultimately, I want to create a list that basically says...you searched for
"Bill", and bill was found under name (some guy named bill) under category
(some category named bill), etc...
Now, I can output the data just fine, and see the keys, the problem is, I
can't hold them...when I do a query like so...
<cfoutput query="name">
<cfset i = #key#>
#key#
</cfoutput>
<cfquery datasource="numberonerule" name="everythingelse">
Select ID, Name, Quote, Category, Topic
From Quote
where id = #i#
</cfquery>
and the key output is 10 11 12, the "everythingelse" query only runs for the
last key result being "12".
I assume the CFoutput "name" overwrites the variable everytime it runs
through, and it runs first, before hitting the query resulting in me only
getting 1 result not 3.
Now, i've been playing with Array's figuring I could potentially throw an
array into the cfoutput and hold all of the key results, but with little
success...
Any help would be awesome, i'm really suck, I hope I explained this
well...thanks in advance
CadenTerrik Guest
-
How to search into an array of objects?
Hi, Is there a way to find an item into a array of object without parse each object? Ex: var : myArray : Array = new Array( {label : "cup",... -
ANN: InterAKT Site Search - search in multiple tables
Hello, We have just released a new product, MX Site Search, meant to help web developers and designers create a search form in their dynamic... -
#25786 [NEW]: PHP website uses cookies to remember last search phrase in search box
From: tipsen at imada dot sdu dot dk Operating system: - PHP version: Irrelevant PHP Bug Type: Unknown/Other Function Bug... -
search for duplicates and sort array
Rick L wrote: Whenever someone wants to know if a <something> is a member of a set, then it springs to mind that a hash is desired, not an array.... -
non recursive array on search
I am getting the error message Notice: Uninitialized string offset: 7 in c:\inetpub\wwwroot\webpage10\example\search\dsp_search.php on line 61 ... -



Reply With Quote

