[web2py] Re: Question about sum()

2013-02-10 Thread Calycé
Grazie mille Massimo, It is indeed what I was looking for :-) On Sunday, February 10, 2013 5:19:55 PM UTC+1, Massimo Di Pierro wrote: > > I think you want: > > booked = db.booking.seats.sum().coalesce_zero() > > On Sunday, 10 February 2013 02:53:40 UTC-6, Calycé wrote: >> >> Hi all, >> >> Given a

[web2py] Re: Question about sum()

2013-02-10 Thread Massimo Di Pierro
I think you want: booked = db.booking.seats.sum().coalesce_zero() On Sunday, 10 February 2013 02:53:40 UTC-6, Calycé wrote: > > Hi all, > > Given a query like the following one: > booked = db.booking.seats.sum() > db(db.schedule.training==db.training.id).select(db.schedule.training_date,db > .tra