SunQuest
           Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 18th, 2002, 01:39 PM
getchoo getchoo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 20 getchoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
"start" parameter

Hi I need to ask a question about the start parameter. I made a previous post awhile back about it but I am still unclear how to use it. I wanted to diplay 10 records per page, if it exceeded that it it would display it on another page with a link to it. I view the source on the devshed forum that used start parameter:

href="http://forums.java.sun.com/forum.jsp?forum=45&start=30&range=15"><B>3</B></A>&nbsp;<A
href="http://forums.java.sun.com/forum.jsp?forum=45&start=45&range=15"><B>4</B></A>&nbsp;<A
href="http://forums.java.sun.com/forum.jsp?forum=45&start=60&range=15"><B>5</B></A>&nbsp;<A
href="http://forums.java.sun.com/forum.jsp?forum=45&start=75&range=15"><B>6</B></A>&nbsp;<A
href="http://forums.java.sun.com/forum.jsp?forum=45&start=90&range=15"><B>7</B></A>

1. is the above code all I need to accomplish this?
2. what does forum=45&amp refer to?
3. would forum.jsp be an blank page(no code) to display the remaining records
4.I have a page(portion of code)
while(rs.next())
{
String cisy1212=rs.getString("cisy1212");
String cisy2311=rs.getString("cisy2311");
String cisy2313=rs.getString("cisy2313");
String cisy2314=rs.getString("cisy2314");
String cisy2315=rs.getString("cisy2315");


%>
<tr bgcolor="#efefef">
<td width="8%" height="18"><%= rs.getString("recdate")%></td>
<td width="10%" height="18"><%= rs.getString("studentid")%>
<input type="hidden" name="studentid" value="<%= rs.getString("studentid")%>"></td>
<td width="11%" height="18"><%=rs.getString("firstname")%>
<%=rs.getString("lastname")%></td>
<td width="15%" height="18"><a href="mailto:<%=rs.getString("email")%>"><%=rs.getString("email")%></a></td>
<td width="13%" height="18"> <%
if((cisy1212!=null) || (cisy2311 !=null) ||(cisy2313!=null) ||(cisy2314!=null) ||(cisy2315!=null))
%> <%=cisy1212%>,<%=cisy2311%>,<%=cisy2313%>,<%=cisy2314%>,<%=cisy2315%></td>

<td width="15%" height="18"><%=rs.getString("cisy1212")%>,<%=rs.getString("cisy2311")%>,<%=rs.getString("cisy2313")%>,<%=rs.getString("cisy2314")%>,<%=rs.getString("cisy2315")%></td>
<td width="6%" height="18"><%=rs.getString("qualified")%></td>
<td width="6%" height="18"><%=rs.getString("applied")%></td>
<td width="6%" height="18"><%=rs.getString("accepted")%></td>
<td width="6%" height="18">
<input style="BACKGROUND-IMAGE: url(file://C:\jakarta-tomcat-4\webapps\CISY2415\images\trash2.gif); WIDTH: 28px; HEIGHT: 36px; BACKGROUND-COLOR: #efefef" type=submit name=delete size=14 onClick="alert('Do you want to delete the record?')">
</td>
</tr>
<p><a href="file://C:\jakarta-tomcat-4\webapps\newCISY2415\page.jsp?page=45&start=1&range=1">previous</a>

<a href="file://C:\jakarta-tomcat-4\webapps\newCISY2415\page.jsp?page=45&start=1&range=1">next</a></p>

<% } //end while()

would I put the start parameter inside the loop? do I have to use a limit function in mysql statement?

Thanx

getchoo

Reply With Quote
  #2  
Old March 18th, 2002, 02:13 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,686 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 5 Days 16 h 27 m 51 sec
Reputation Power: 259
<A
href="http://forums.java.sun.com/forum.jsp?forum=45&start=90&range=15"><B>7</B></A>
is a simple GET request made trough a url forum=45 start=90 range=15 are the parameters passed.
So IMHO isn't a real start parameter.
You can set the start and range values dinamically in a loop to build that "prev 1 2 3 4 next" indexes. Probably forum=45 identifies a specific forum.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > "start" parameter


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