Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [kjetilpa] How make a "next record"-link?

Quote Reply
Re: [kjetilpa] How make a "next record"-link? In reply to
Hi Kjetil,

You might pass a param i.e. next_page=ID+1 to your detail page of a record using variable <%last%> inside the loop of your search_results:

<%loop results%>

.....

your link to detail page &<%ifnot last%>next_page=<%ID+1%><%endif%>&param..

.....

<%endloop%>

After that, you can add a new link to next record:

<%if next_page%>
db.cgi?db=your_table&do=search_results&ID=<%next_page%>&ID-opt==....
<%endif%>


Cheers,
Jean(at)Gossamer Threads Inc.

Notes: You can use the following tags inside a loop:
<%row_num%> - a counter for what row is being looped, starts at 1.
<%first%> - boolean that is true if this is the first row, false otherwise.
<%last%> - boolean that is true if this is the last row, false otherwise.
<%inner%> - boolean that is true if this is not first and not last.
<%even%> - boolean is true if row_num is even.
<%odd%> - boolean is true if row_num is odd.

Subject Author Views Date
Thread How make a "next record"-link? kjetilpa 4534 Mar 17, 2002, 6:13 AM
Thread Re: [kjetilpa] How make a "next record"-link?
jean 4379 Mar 17, 2002, 9:31 PM
Thread Re: [jean] How make a "next record"-link?
charly 4322 Jun 5, 2002, 9:18 AM
Thread Re: [charly] How make a "next record"-link?
charly 4334 Jun 5, 2002, 1:51 PM
Post Post deleted by charly
charly 4268 Jun 15, 2002, 1:46 PM
Post Re: [charly] How make a "next record"-link?
Reena0330 4132 Sep 3, 2002, 3:19 PM