[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

bringing Data in Chunks Coldfusion

Posted on 2011-09-20
11
Medium Priority
?
217 Views
Last Modified: 2012-05-12
Hi, I am making one ajax call as:

$.ajax({ type:"POST", url:"welcome.cfm", data: data, success: function (html) { $('#message').html(html); } }); return false;

So now i want that i should return 100 records first time it calls that Page, now i want to apply the Paging to that also. So when i cick the next record or any number in paging say 5, it should display that data and make an ajax call to get that data, this way i think it will be better to handle millions of records!

Also i cannot use cfgrid, jquery preferred. if i can get the data as JSON and parse on client ide, i think that can make performance faster!

Guide


0
Comment
[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
  • 6
  • 4
11 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 36565885
if you are using mysql, then why don't you use limit and offset to get only that many number of rows from database
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 36565914
i am not using mysql

sorry
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 36565946
then which one?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 36566107
oracle
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 36566147
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 36566636
well if i get a sample for this that will be good
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 36566690
I would think you need to pass the page number to the ajax call, otherwise how will the query know which page of 100 records to return?   It may be even better to pass both page number and page size (in case you want to allow the user to vary their page size in the future)
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 36566764
yes that will be, but how. that is confusion
0
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 2000 total points
ID: 36566823
something like

SELECT * FROM
   (SELECT ename FROM emp ORDER BY dbms_random.value())
WHERE rownum >= 1 and rownum <=10;

1 and 10 values can come from a variable which will be evaluated based on the pagination logic
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 36600242
nope used the between operator and worked like a charm Thanks
0
 
LVL 16

Author Closing Comment

by:Gurpreet Singh Randhawa
ID: 36600246
thanks for showing a way
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

649 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