thanks Kiran, I would be interested to know if this is possible when defining the query to be equivalent to "SELECT Field FROM TABLE LIMIT 15". In the web2py documentation this is used in DALs using "Select" but not when defining queries. Have I misunderstood something?
thanks and regards, John db().select(db.person.ALL, limitby=(0, 2)) On Tuesday, March 4, 2014 1:35:23 PM UTC+1, Kiran Subbaraman wrote: > > paginate should work. > http://web2py.com/books/default/search/29?search=paginate > > ________________________________________ > Kiran Subbaraman > http://subbaraman.wordpress.com/about/ > > On Tue, 04-03-2014 4:49 PM, John Philip wrote: > > Dear forum, > > > > sorry for asking this basic question. I would like to limit the > > number of rows in a query 'passlist' which I want to show in a SQLFORM > > grid. I did try using limitby but this caused a syntax error. I only > > saw it being used in select queries. Any help would be appreciated. > > > > passlist = (db.nextpasses.BOT>=windowTT) > > sgrid = SQLFORM.grid(passlist) > > > > many thanks, > > > > John > > -- > > Resources: > > - http://web2py.com > > - http://web2py.com/book (Documentation) > > - http://github.com/web2py/web2py (Source code) > > - https://code.google.com/p/web2py/issues/list (Report Issues) > > --- > > You received this message because you are subscribed to the Google > > Groups "web2py-users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to [email protected] <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

