Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pagination of multiple feeds/queries

Posted on 2007-12-06
6
Medium Priority
?
643 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 1000 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 1000 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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

722 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