[web2py] Re: SQL NOT IN issue(belong)

2019-01-03 Thread Yann Dulondel
Thank for your answer. Ok i understand that this db((db.v_heatpad.id_depot==db.auth_user.id_depot)&(db.auth_user.id==auth. user.id)&(db.v_heatpad.padid==db.heatpad.id)) Create a where clause and belong does work with a full SQLcommande (Select from t1,t2 where .) [image:

[web2py] Re: SQL NOT IN issue(belong)

2019-01-03 Thread Val K
Hi! `belongs` accepts list, tuple, SQL-string (that can be generated by `_select `) and in some cases it may be a `query` (see book for details) but you're trying to feed it with field-object On Thursday, January 3, 2019 at 11:39:34 AM UTC+3, Yann Dulondel wrote: > > > > Le mercredi 2

[web2py] Re: SQL NOT IN issue(belong)

2019-01-03 Thread Yann Dulondel
Le mercredi 2 janvier 2019 16:55:54 UTC+1, Yann Dulondel a écrit : > > Hi All > Happy new year 2019. > > I have an issue with SQL NOT IN > I tried to get a heater pad list(dropdown) in a form. > The heater must be related to user depot and not been used. > If they are used the heater id is set