Ask a Question related to Coldfusion Database Access, Design and Development.
-
dkerr #1
Multiple output from singe search query
I have a search page that searches a database table of technical articles on a
computer support site. In the table, there are bit columns for HotTopic and
ET. When adding an article, the technician sets ET=1 and/or Hottopic=1.
Currently the search outputs the all of the results ordered by date. I would
like to output the HotTopics first, then the ET articles, then everything else.
I don't want to have to run the query 3 times during search processing. Is
there a way in my output to take the single query results and output the
results something like this:
Hot Topics
-only articles where hottopics =1
ET Articles
-only articles where ET=1
Everything Else
-all other records
OR do I need to write 3 separate queries where query one select articles where
hottopics=1, query two selects articles where ET=1, and query 3 selects all
other articles?
What is the most efficient way to do this?
I was thinking I could use a <cfloop> and <CFIF> statements to loop through
the output to separate these 3 levels out. My query is very large with a ton
of conditions, so I don't really want to repeat it with different where
clauses. Code is far too much to include here.
Any general suggestions on an efficent approach? Any basic example code?
I appreciate the help.
Don
dkerr Guest
-
CFFILE output multiple rows from a query
I have a quiestion about the below. I am working with this method, but I find that my code results in the first record being outputed twice in the... -
Query problem with multiple records output
ABERDEEN, , GB ABERDEEN, MD, US ABERDEEN, MS, US ABERDEEN, NC, US ABERDEEN, SD, US ABERDEEN, WA, US Results as above from a search form... -
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... -
CAML Query: Multiple Query Fields Issue
I need to Create a CAML Query Dynamically with VB to a Sharepoint WebService GetListItems Method. The User Could Select 1 to X Number of IDs... -
Search multiple keywords across multiple fields
Hi, I'm about halfway through building a search engine using ASP, SQL and Access. As part of that search engine I need to search multiple... -
-
dkerr #3
Re: Multiple output from singe search query
Thanks. But what is it? Does it work with MX 6.1?
dkerr Guest
-
Dan Bracuk #4
Re: Multiple output from singe search query
Yes it works with version 6. Put "coldfusion query of queries" into a google text box for lot's of good info.
Dan Bracuk Guest
-
dkerr #5
Re: Multiple output from singe search query
Thank you. This will work. Found a nice basic tutorial...
[url]http://www.sitepoint.com/article/query-queries[/url]
dkerr Guest



Reply With Quote

