Solved

Pagination of multiple feeds/queries

Posted on 2007-12-06
6
634 Views
Last Modified: 2012-08-13
I am currently adding various feeds of hotels to our site www.hotelkingdom.com, where I have a glitch is that I need to enable pagination so that only 25 results are displayed per page. Pretty simple if I only had one query but what I have is a query of our personal inventory followed by an xml feed that I am converting on the fly into coldfusion query results. My question is if anyone has experience in adding pagination to a page where the results will be multiple queries one right after another.
0
Comment
Question by:buddhatech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
reitzen earned 250 total points
ID: 20421764
I would create a table on my local server where I would insert all data recieved from the remote feeds.

Then I could query my local source and include pagination, sorting, grouping, etc.

Be sure to create an IDENTITY column ("myIdendity") in your local table that starts at 1 (one) witha a seed of 1 (one).  Before you insert the data into your local table, truncate the table from the last load.  This will reset the IDENTITY column.  Then your query would look like this:

SELECT TOP 25 *
FROM myTable
WHERE myIdentity >= 1
0
 

Author Comment

by:buddhatech
ID: 20421929
I had actually considered doing that, but that still doesn't help with the existing hotels we have in our personal database I somehow need to merge the two. :)
0
 
LVL 6

Expert Comment

by:reitzen
ID: 20422562
This could be solved in two ways:

1. The INSERT data could come from a UNION query on your CF page that would mix your existing hotels with the external ones

INSERT INTO myTable (field1, field2, ...)
(    select * from myLocalHotels
     UNION ALL
     select * from myRemoteHotels
)

2.  Inserting the external and internal data in two steps.  Insert your existing hotels first and then the remote ones.

HTH
0
 
LVL 36

Assisted Solution

by:SidFishes
SidFishes earned 250 total points
ID: 20422635
without seeing your code....there's a couple of ways you might do this...

set your query results into a struct
use query of query
create an xml file using cffile and append the results, then read it back




0

Featured Post

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question