[Zope] Can not display 'Next' and 'Previous' records!!!!!!

Angie angietel@hotmail.com
Thu, 29 Mar 2001 11:52:01 +0800


This is a multi-part message in MIME format.

------=_NextPart_000_0089_01C0B846.AA721A80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

This problem troubled me for few weeks, i really dont know what and =
where is goin wrong

below is my dtml to display the Previous record

<dtml-in b previous size=3D5 start=3Dquery_start>

<td ><font class=3D"next25">
       <a href=3D"<dtml-var URL><dtml-var sequence-query
                  >query_start=3D<dtml-var
                 previous-sequence-start-number>" =
style=3D"text-decoration:none">
         Previous <dtml-var previous-sequence-size> record(s)<<
   </a>
</font></td>
</dtml-in>

'b' is my search sql method, because i got 2 searching key so i have to =
create 3 search sql method to search my record inorder to select one =
from these 3 sql methods i used dtml to select from 3 search sql =
methods, as follow:

<dtml-with "Search">
<dtml-call "REQUEST.set('b','')">
*assign a variable 'b'
=20
<dtml-if "_['custname']!=3D'' and _['custid']=3D=3D''">   =20
* if custname is not empty and custid is empty
 <dtml-call "REQUEST.set('b', sqlSearchcust3)">=20
* assign b as sql method named 'sqlSearchcust3'
=20
<dtml-elif "_['custid']!=3D'' and _['custname']=3D=3D''">
* if custid is not empty and custname is empty
 <dtml-call "REQUEST.set('b', sqlSearchcust2)">=20
* assign b as sql method named 'sqlSearchcust2'

<dtml-elif "_['custid']!=3D'' and _['custname']!=3D''">
* if custid is not empty and custname is not empty
 <dtml-call "REQUEST.set('b', sqlSearchcust)">=20
* assign b as sql method named 'sqlSearchcust'
=20
<dtml-elif "_['custid']=3D=3D'' and _['custname']=3D=3D''">
 <dtml-var "searchallcust">
* call the sql method which select all records.
 </dtml-if>=20
</dtml-with>

so far it can return the correct result for me, but i'm not sure whether =
is this function affect my Previous record=20
please let me know my problem as soon as possible.



------=_NextPart_000_0089_01C0B846.AA721A80
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>This problem troubled me for few weeks, =
i really=20
dont know what and where is goin wrong</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>below is my dtml to display the=20
<STRONG>Previous</STRONG> record</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-in b previous size=3D5=20
start=3Dquery_start&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;td &gt;&lt;font=20
class=3D"next25"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a=20
href=3D"&lt;dtml-var URL&gt;&lt;dtml-var=20
sequence-query<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&gt;query_start=3D&lt;dtml-var<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
previous-sequence-start-number&gt;"=20
style=3D"text-decoration:none"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;=20
Previous &lt;dtml-var previous-sequence-size&gt;=20
record(s)&lt;&lt;<BR>&nbsp;&nbsp;=20
&lt;/a&gt;<BR>&lt;/font&gt;&lt;/td&gt;<BR>&lt;/dtml-in&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>'b' is my search sql method, because i =
got 2=20
searching key so i have to create 3 search sql method to search my =
record=20
inorder to select one from these 3 sql methods i&nbsp;used&nbsp;dtml to =
select=20
from 3 search sql methods, as follow:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-with =
"Search"&gt;<BR>&lt;dtml-call=20
"REQUEST.set('b','')"&gt;<BR>*assign a variable 'b'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-if "_['custname']!=3D'' and=20
_['custid']=3D=3D''"&gt;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*&nbsp;if custname is not empty and =
custid is=20
empty<BR>&nbsp;</FONT><FONT face=3DArial size=3D2>&lt;dtml-call =
"REQUEST.set('b',=20
sqlSearchcust3)"&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>* assign b as sql method named=20
'sqlSearchcust3'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-elif "_['custid']!=3D'' and=20
_['custname']=3D=3D''"&gt;<BR>* if custid is not empty and custname is=20
empty<BR></FONT><FONT face=3DArial size=3D2>&nbsp;&lt;dtml-call =
"REQUEST.set('b',=20
sqlSearchcust2)"&gt; </DIV>
<DIV><FONT face=3DArial size=3D2>* assign b as sql method named=20
'sqlSearchcust2'</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;dtml-elif "_['custid']!=3D'' and _['custname']!=3D''"&gt;</DIV>
<DIV>* if custid is not empty and custname is not =
empty<BR>&nbsp;&lt;dtml-call=20
"REQUEST.set('b', sqlSearchcust)"&gt; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>* assign b as sql method named=20
'sqlSearchcust'</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-elif "_['custid']=3D=3D'' and=20
_['custname']=3D=3D''"&gt;<BR>&nbsp;&lt;dtml-var =
"searchallcust"&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>* call the sql method which select all=20
records.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&lt;/dtml-if&gt;=20
<BR>&lt;/dtml-with&gt;<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>so far it can return the correct result =
for me, but=20
i'm not sure whether is this function affect my =
<STRONG>Previous</STRONG> record=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>please let me know my problem as soon =
as=20
possible.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0089_01C0B846.AA721A80--