[Zope-DB] result set question

Alexander Batzios alexb@runbox.com
Tue, 12 Mar 2002 22:57:39 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0033_01C1CA19.4F59C180
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello.

I am developing a search engine with Zope. It queries a mySQL database =
according to the search criteria of a web form and outputs the results. =
I have it working and all but I would like to ask two things:

1. Is it possible to split the results into pages of say 10 results? If =
yes, how? Does Zope provide a way of doing this? Do I need to ask mySQL =
to fetch the first 10 records, then the next 10, and so on? Is it =
possible?
2. I want to have each record hyperlinked, so that when a user clicks on =
it, he/she can view more details. Do I need to create a separate =
database access object to handle these requests?

I am sorry if these are too simple questions, but I am reading the =
documentation and cannot find an exact answer. I am still trying to =
grasp exactly how zope works.

Thanks,
Alex


------=_NextPart_000_0033_01C1CA19.4F59C180
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 http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am developing a search engine with =
Zope. It=20
queries a mySQL database according to the search criteria of a web form =
and=20
outputs the results. I have it working and all but I would like to ask =
two=20
things:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>1. Is it possible to split the results =
into pages=20
of say 10 results? If yes, how? Does Zope provide a way of doing this? =
Do I need=20
to ask mySQL to fetch the first 10 records, then the next 10, and so on? =
Is it=20
possible?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. I want to have each record =
hyperlinked, so that=20
when a user clicks on it, he/she can view more details. Do I need to =
create a=20
separate database access object to handle these requests?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am sorry if these are too simple =
questions, but I=20
am reading the documentation and cannot find an exact answer. I am still =
trying=20
to grasp exactly how zope works.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Alex</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0033_01C1CA19.4F59C180--