i apologize Zak - i just re-read your question - i misread it.

i 'think' you can pass out an object if you setup your select with a join,
then build a structure like a list (my_list = []), then loop through your
results, and append them to the list - then pass in the list object and loop
through it in the template

sorry for the confusion.
________________________________________________________
http://www.superantispyware.com/superantispyware.html?rid=3971 Remove All
The Spyware - Not Just The Easy Ones!
http://1-4-u.info | Don't send insanely long links!
Need a Pick-Me-Up? http://quotes.feedtheguru.com



On Fri, Aug 6, 2010 at 12:50 PM, Zak <[email protected]> wrote:

> Hey all,
> I have another newbie's question. I googled the question, but I can
> not find clues.
>
> An example code for a function, (Not real, just for showing 2
> instances of db.select):
>
> import web
> db = web.database(dbn='mysql', db='mydata', user='dbuser', pw='')
> results1 = db.select('mytable', where="name = $name1")
> results2 = db.select('mytable', where="age = $age")
> return (result1 + result2) ## wrong, return [results1, results2] is OK
>
> Can I combine the out of db.select results1 and results2 to a instance
> of db.select (Not by combining where clauses)? so the function can
> return an object.
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <webpy%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to