Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old December 4th, 2001, 08:21 AM
nickname nickname is offline
inexperienced and useless
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Stevenage, uk
Posts: 10 nickname User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dispalying Database finds a few at a time?

I am using a python cgi to query a chemically aware database (daylight software) and for every query I am getting a large number of results. Obviously I would like it if I could display about 25 at a time. I can do this for the first 25, but then after that I don't know how to have a link to the next set of results without having to point to a new page. Is there anyway around this.

At the minute all the results are contained in a list called result_list.
The first 25 are;
printable_results = result_list[0:24]
and obviously this is called in the html by the %s symbol. I wondered if there was any way that a link in the html could change the value of %s to then display the next 25 results?

Reply With Quote
  #2  
Old December 5th, 2001, 03:28 AM
Taradino Taradino is offline
Python Prophet
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Amersfoort, The Netherlands
Posts: 45 Taradino User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I'm not sure what you want to do. Do you want to show new results without loading a new page? Then you should fetch all results into a JS array, and I guess you could show 25 at a time using DHTML.
If you just want to get 25 results per page, just define something like &offset=34 in the URL to show results 34-59. Use this offset in your SQL with LIMIT offset, offset+25. Of course, this is all pseudo-code.
__________________
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. - Jamie Zawinski, in comp.lang.emacs

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Dispalying Database finds a few at a time?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway