On 11/17/2011 01:42 PM, raulna wrote:
Hi,

i need save results in a python object from multiples querys, like:

for user in users:
                     phones = DBSession.query(Phone).filter('...
    <<<<          python_object = python_object + phones   ?????>>>>>

How can i append this results in unique object?

The simplest is to fetch all results from a query and concatenate the lists:

results = query_1.all() + query_2.all() + query_3.all()

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to