|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Orginizing Search Results
Hey all,
So, let's say you are using a verity search, and you pull all sorts of stuff from it, and works no problem. I want to perhaps try to orginize that data. So let's say inside your database you have... Name, Category, and Topic field...and you search for, let's say "Bill", well, bill maybe the name of a person "Bill S. Preston! ESQ!", or inside a category "How to Bill Clients for more and get away with it", etc. How can I tell CF to only display things found via the name bill and somewhere else only things found via the category bill, but on the same page. So, Searched: Bill Found Under Name: Bill S. Preston! ESQ! Found under Category: How to Bill Clients for more and get away with it Thanks! |
|
#2
|
|||
|
|||
|
Uhh, I think I just figured it out...
Although you gotta give me respect for that shout out to Bill & Ted WILD STALIONS! |
|
#3
|
|||
|
|||
|
Ok, I take it back, I didn't figure it out, please help =0p
|
|
#4
|
|||
|
|||
|
You might be able to create separate collections. Or you may be able to manipulate the search result set by looping over it or using query of queries on it.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#5
|
|||
|
|||
|
any chance you could toss me a simple example of a query in a query?
I'll check the book, but I haven't tried that yet... |
|
#6
|
|||
|
|||
|
So I took a different route and ran into a strange problem.
So i've gotten what I want working, like this... <CFIF (Form.criteria NEQ "")> <cfsearch name = "name" collection = "numberonerulen" criteria = "#Form.Criteria#"> <cfsearch name = "category" collection = "numberonerulec" criteria = "#Form.Criteria#"> <CFELSE> <CFLOCATION URL="searchquote.cfm"> <CFABORT> </CFIF> <cfquery datasource="numberonerule" name="everythingelse"> Select ID, Name, Quote, Category, Topic From Quote where ID = #name.key# </cfquery> And then... <cfoutput query="everythingelse"> <span class="maintext"> Name: #Name#<br> Quote: #quote# </cfquery> Now...when I just run the search to output...I get 3 different results...which makes sense, since there are 3 different records the search should hit via my criteria. When I use the code above...it only processes for 1 record...why is that? Thanks Caden P.S. It is only displaying the last record...so, it is pulling the 10, 11 and 12th record but only shows record 12. |
|
#7
|
|||
|
|||
|
Alright, so I know what the problem is, obviously CFSearch/Query doesn't work like if I was using CFOutput.
Obviously it isn't running through all the records CFSearch finds...anyone know a way to fix that, or if there is a way around it? I've tried looping and such, but it only loops off of that last record... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Orginizing Search Results |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|