| 
      
      
      From: Thomas S. <ps...@on...> - 2001-02-07 23:41:26
      
     | 
| Well, I think we've really put this one to rest, and I think Dieter will
have to be duely impressed enough to develop the search code portions
of sql-ledger in the direction of record count limits on navigational
pages. i.e. n pages of m records each. And like I said the 'offset' method
seems most appropriate esspecially since it encodes in a like fashion
with an offset and count. That is to say:
 
SELECT * FROM table OFFSET current-pg-number * recs-per-page LIMIT recs-per-page;
Agreed? Of course I bet Matt Benjamin is nearly done with coding this
already. Right? Else, do you want to go ahead? Let me know.
P.S. FYI I'm nealy done with a Sales Order module, simply based after
the invoice module but with accounting activities removed. More soon...
-- 
Thomas Sawyer
ps...@on... - email
(303) 285-3487 x1594 - voicemail/fax
---- Scott Taylor <gst...@te...> wrote:
> dr...@ss... wrote:
> > 
> > In message <Pin...@ti...>,
> "Roderick A.
> >  Anderson" writes:
> > > On Tue, 6 Feb 2001, Andrew Sharp wrote:
> > >
> > > >     if($CONFIG{sqllimit} == 1) {
> > > >         # this presuposes a limit statement in postgresql, but
> > > >         # I think it has them.  If it doesn't it can be coded
> > > >         # around anyway.
> > >
> > > PostgreSQL does have the limit clause which I believe is in the
> SQL92 and
> > > SQL99 standards.  It's easy to get into the MySQL (choose your
> own
> > > database) has this feature or that thingy but for the most part
> PostgreSQL
> > > follows the standands better than the other databases.
> > >
> > >    The problem with the limit statement is it is 'stateless'. 
> It picks
> > > the first 'n' records that meet the rest of the selection criteria.
> > > There is no easy way to remember the current 'n' items at the database
> > > level so the the next SELECT statement can pick the next 'n' items.
> > 
> > There is a way to pick the next set.  Use the offset keyword.
> > 
> > select * from table where criteria offset START limit LENGTH
> > 
> 
> Hi, 
> 
> phpGroupWare does this with the todo list (and other apps) using PHP
> and
> MySQL or PostgreSQL.  Converting to CGI/Perl input shouldn't be too
> difficult. 
> Check it out at http://www.phpgroupware.org/  it's still very much
> in
> the developement stage, I would suggest rel 0.9.1 or 0.9.2, the newer
> ones seem to be more buggy. :o(
> 
> Regards.
> 
> 
__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com
 |