I need some help with a DAL query. I'm trying to update records, but my 
query contains joins.

*tournament Table*
| id | start | end |

*match Table*
| id | tournamentID | home_team | away_team | start | end |

db( ((db.tournament.start >= '2015-01-01 00:00:00') & (db.tournament.end <= 
'2015-12-31 00:00:00')) &\
        (db.tournament.id == db.match.tournamentID) ).update(start= 
db.match.start + timedelta(hours=1), end= db.match.end + timedelta(hours=1))

I want to add 1 hour to the start and end fields *in the match table* (not 
the tournament table). But when I try to run this DAL statement, I get an 
error saying "Too many tables" (because of the join, I suppose). What would 
be an alternate single query for this?
Thanks
 
Note: Start and End columns are datetime.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to