|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
"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> <A href="http://forums.java.sun.com/forum.jsp?forum=45&start=45&range=15"><B>4</B></A> <A href="http://forums.java.sun.com/forum.jsp?forum=45&start=60&range=15"><B>5</B></A> <A href="http://forums.java.sun.com/forum.jsp?forum=45&start=75&range=15"><B>6</B></A> <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& 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 |
|
#2
|
||||
|
||||
|
<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.
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > "start" parameter |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|