r1 = db(query0).select(db.table.ALL,orderby=something)
r2 = db(query1).select(db.table.ALL,orderby=somethingelse)
my_rows = r1.as_list() + r2.as_list()

h1 = SQLTABLE(r1,headers=headers)  #<< works
h2 = SQLTABLE(r2,headers=headers)  #<< works

h3 = SQLTABLE(my_rows,headers=headers)  #<< does not work

So despite this example above I still can't really append/delete rows
in SQLRow objects.

I'd need that to fill a view table where r1 are detailed records below
of that, but still in the same view table the with .sum() query
calculated totals (=r2) and below of that but still in the same view
table a manually consolidated total from a query of a different table.
Ideally would be if also a blank row/record could be inserted between
the detail records and the total row(s).

How can this be best achieved?

hans

On Apr 26, 4:07 pm, Álvaro Justen [Turicas] <alvarojus...@gmail.com>
wrote:
> On Sun, Apr 26, 2009 at 1:02 AM, weheh <richard_gor...@verizon.net> wrote:
> > Thanks Álvaro, that looks like it would do the trick. How did you
> > learn this? Did you study the gluon code or did you read about this
> > elsewhere?
>
> I read gluon code, but in this case I only used ipython shell.
> Install ipython and do:
> python web2py.py -S yourapp -M
>
> So you will enter in a more powerful shell. Do:
> myrow = db(db.table.id >= 50).select()
>
> Type "myrow." and press TAB: all "myrow" methods and attributes will be shown.
> If you type "myrow.as_list?" and press ENTER, will you see docstring
> for that method (as_list doesn't have...). If you type
> "myrow.as_list??" and press ENTER, code of "as_list" will be shown. It
> is very useful.
>
> --
>  Álvaro Justen
>  Peta5 - Telecomunicações e Software Livre
>  21 3021-6001 / 9898-0141
>  http://www.peta5.com.br/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to