On Sep 24, 7:23 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message <[EMAIL PROTECTED]>, coldpizza > wrote: > > > So far, with mysql I use 'SELECT * FROM TABLE LIMIT L1, L2' where L1 > > and L2 define the range for the 'Next' and 'Previous' commands. I > > have to run the query every time a click a 'Next/Prev' link. But I am > > not sure that this is the best and most efficient way.
> Try it first, then see what happens. Remember, premature optimization is the > root of all (programming) evil. It turned out that the method above ('SELECT * FROM TABLE LIMIT L1, L2') works ok both with mysql and sqlite3, therefore I have decided to stick with it until I find something better. With Sqlite3 you are supposed to use LIMIT 10 OFFSET NN, but it also apparently supports the mysql syntax (LIMIT NN, 10) for compatibility reasons. -- http://mail.python.org/mailman/listinfo/python-list