You cannot update() or delete() when there are joins. >From which table do you want to delete records? MatchPlayers or Matches? Or both?
If you set the ondelete=cascade (I think it's the name of it) in your parent table, children records will be deleted when you delete one record from it. On Thu, Jul 11, 2013 at 9:17 AM, Jurgis Pralgauskis <[email protected]> wrote: > db( (db.MatchPlayers.player==playerID) & (db.MatchPlayers.match_ == > db.Matches.id) & (db.Matches.started == None) ).delete() > > gives: > > raise RuntimeError("Too many tables selected") > > any hints? > > http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update > I don't find examples for similar cases > > I could select first , and then loop deleting records of needed table ... > but would be not very efficiet > > -- > > --- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

