yes copy/paste it works because in the view associated i can see the var "firstname"
Le mercredi 16 septembre 2015 16:48:19 UTC+2, Anthony a écrit : > > On Wednesday, September 16, 2015 at 10:33:39 AM UTC-4, Laurent Lc wrote: >> >> like this : >> myvar="toto" >> for row in dbRH(dbRH.test.login==myvar).select(): >> firstname = row.firstname >> >> the sql request doesn't work beacause myvar does not exist in sql but in >> python. so i don't know how to do >> > > Yes, myvar is a Python variable, but then again, it is being used in > Python code, so no problem there. The DAL will convert that to the > appropriate SQL statement. Are you sure that is your *exact* code? How > are you determining whether it "works"? I suspect you have a problem > elsewhere. > > Anthony > -- 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.