I am not an expert at MySQL, but I think I remember someone saying that
LIMIT does not really save you anything.  The db just selects everything and
then throws away the extra results.  You can do this yourself and probably
more intelligently.

Where does the LIMIT constraint go in a SELECT?

There is a LargeSelect class, that I wrote as an example of how to handle
large selects with BasePeer and Village.  My idea is that you perform the
select once (or maybe more often depending on the users use of the <<Prev
button and your memory limits.)  Then pull the results into record objects
as you need them.  Note this class has had little/no testing.  I wrote it in
response to several people asking how large result sets could be handled in
Turbine.  I was hoping it would be a good starting point for someone trying
to solve this problem.  I never received any response from any of the people
who originally brought up the point, so it is still sitting there waiting
for someone to improve it.

John

----- Original Message -----
From: Moshiul Shovon <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Sunday, June 04, 2000 5:51 PM
Subject: BasePeer quesiton


> Hello,
>
> I am using the the Peer Model for my db access. I am
> using MySQL.
>
> The MySQL syntax allows something like "LIMIT 0, 20",
> which will only fetch the first 20 records. Is it
> possible to achieve similar functionality using
> BasePeer.doSelect(...)?
>
> I want to create a page which will have "<<PREV" and
> "NEXT>>" buttons to fetch objects from the db. Is
> there any examples out there how can I do that using
> the peer model? Note: I don't want to fetch all the
> objects at a time.
>
> Thanks ...
>
> -shovon-
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos -- now, 100 FREE prints!
> http://photos.yahoo.com
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to