[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> </DIV>
<DIV><FONT face=3DArial size=3D2>below is my dtml to display the=20
<STRONG>Previous</STRONG> record</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-in b previous size=3D5=20
start=3Dquery_start></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><td ><font=20
class=3D"next25"><BR> <a=20
href=3D"<dtml-var URL><dtml-var=20
sequence-query<BR> &=
nbsp; =20
>query_start=3D<dtml-var<BR> &nb=
sp; =20
previous-sequence-start-number>"=20
style=3D"text-decoration:none"><BR>  =
; =20
Previous <dtml-var previous-sequence-size>=20
record(s)<<<BR> =20
</a><BR></font></td><BR></dtml-in></FONT></DIV>
<DIV> </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 used dtml to =
select=20
from 3 search sql methods, as follow:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-with =
"Search"><BR><dtml-call=20
"REQUEST.set('b','')"><BR>*assign a variable 'b'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-if "_['custname']!=3D'' and=20
_['custid']=3D=3D''"> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>* if custname is not empty and =
custid is=20
empty<BR> </FONT><FONT face=3DArial size=3D2><dtml-call =
"REQUEST.set('b',=20
sqlSearchcust3)"> </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> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-elif "_['custid']!=3D'' and=20
_['custname']=3D=3D''"><BR>* if custid is not empty and custname is=20
empty<BR></FONT><FONT face=3DArial size=3D2> <dtml-call =
"REQUEST.set('b',=20
sqlSearchcust2)"> </DIV>
<DIV><FONT face=3DArial size=3D2>* assign b as sql method named=20
'sqlSearchcust2'</FONT></DIV>
<DIV> </DIV>
<DIV><dtml-elif "_['custid']!=3D'' and _['custname']!=3D''"></DIV>
<DIV>* if custid is not empty and custname is not =
empty<BR> <dtml-call=20
"REQUEST.set('b', sqlSearchcust)"> </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> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-elif "_['custid']=3D=3D'' and=20
_['custname']=3D=3D''"><BR> <dtml-var =
"searchallcust"></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> </dtml-if>=20
<BR></dtml-with><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> </DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0089_01C0B846.AA721A80--