Re: [web2py] Re: Help on a web2py query

2013-03-25 Thread Niphlod
your original query retrieves only 3 rows, not the last 3 rows for each capitulo On Saturday, March 23, 2013 7:14:01 PM UTC+1, Tito Garrido wrote: Yes, you got it... On Sat, Mar 23, 2013 at 9:33 AM, Niphlod nip...@gmail.com javascript:wrote: so, you want the last 3 capitulo rows,

Re: [web2py] Re: Help on a web2py query

2013-03-23 Thread Niphlod
so, you want the last 3 capitulo rows, for each novela, and for each row you want to retrieve also all the data from the novela attached to each capitulo.all in a single select ? On Friday, March 22, 2013 11:41:06 PM UTC+1, Tito Garrido wrote: db.define_table('novela', Field('nome',

Re: [web2py] Re: Help on a web2py query

2013-03-23 Thread Tito Garrido
Yes, you got it... On Sat, Mar 23, 2013 at 9:33 AM, Niphlod niph...@gmail.com wrote: so, you want the last 3 capitulo rows, for each novela, and for each row you want to retrieve also all the data from the novela attached to each capitulo.all in a single select ? On Friday, March 22,

[web2py] Re: Help on a web2py query

2013-03-22 Thread Niphlod
written as it is, in a view :P we need models, test data and the resultset you want returned, plase ^_^ On Friday, March 22, 2013 11:00:12 PM UTC+1, Tito Garrido wrote: Folks, How could I implement: SELECT * FROM (SELECT * FROM capitulo WHERE data = CURDATE() ORDER BY data) WHERE

Re: [web2py] Re: Help on a web2py query

2013-03-22 Thread Tito Garrido
db.define_table('novela', Field('nome', requires=IS_NOT_EMPTY()), Field('emissora', 'reference emissora', requires = IS_IN_DB(db, db.emissora.id,'%(nome)s')), Field('encerrada', 'boolean', default=False), Field('slug', requires=IS_SLUG()), Field('logo', 'upload',