limiting number of rows on the web page..

Results 1 to 2 of 2

Thread: limiting number of rows on the web page..

  1. #1
    Join Date
    Dec 1969

    Default limiting number of rows on the web page..

    PLEASE HELP! THIS IS VERY URGENT..<BR>Feel free to ask questions if somethings are not clear..<BR>This is not pure HTML<BR>(this is PSP-PL/SQL SERVER PAGES)<BR>(so if you don&#039;t understand somethings, PLEASE don&#039;t freak out! Try to look at the logic)<BR>What i want to do is split my sql into 20 records per page, which i am able to achieve using my sql and ROWNUM,<BR>and then when i click on my next button, i want it to display the records from 21 to 40 and so on..(This is the part where i am having problems)<BR>This is how my code looks like:<BR><BR>/*declaring variables*/<BR>v_begin IN NUMBER DEFAULT 1;<BR>v_end IN NUMBER DEFAULT 20;<BR><BR>/*My SQL which spits out 20 records*/<BR>cursor cuSrv(v_begin IN NUMBER,v_end IN NUMBER) is<BR> select servicestate,AmericanTerritory<BR> from<BR> (select rownum rnum, servicestate,AmericanTerritory<BR> from tbl_servicestateterritoryref)<BR> where<BR> rnum between v_begin and v_end<BR> and rownum &#060;= ((v_end) - v_begin + 1)<BR> order by servicestate asc;<BR><BR>/* HTML that displays the web page, please don&#039;t worry about the syntax because this is PSP*/<BR>&#060;html&#062;<BR>&#060;form ="MyForm" method="post"&#062;<BR>&#060;body&#062;<BR>&#060;t able&#062;<BR>/*This is the PSP way to looping the cursor and spitting data in a table*/<BR>for crSrv in cusrv(v_begin,v_end) loop<BR> htp.tableRowOpen;<BR> htp.tableData(crsrv.servicestate);<BR> htp.tableData(crsrv.AmericanTerritory);<BR> htp.tableRowClose;<BR> end loop;<BR>/*Now when i click on the next button it should display the records from 21 thru 40. How do i do that?*/<BR>&#060;input type="submit" value = "Next" /&#062;<BR>&#060;/body&#062;<BR>&#060;/html&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: limiting number of rows on the web page..

    There are many examples of paging on the 4 Guys site and in the ASP Faqs. They won&#039;t help you with the PSP coding, but they should point you in the right direction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts