[web2py] Re: model define_table select

2017-01-12 Thread Pierre Corbeil
Good day Luca/Massimo, Can you show me the final code ..i'am trying to do exactly that. (unsure of what you have done exactly in db.py) Thanks Le lundi 28 mars 2016 05:51:33 UTC-4, lucas a écrit : > > yes massimo, > > that almost worked. as suggested, i first changed it under the db.py

[web2py] Re: model define_table select

2016-03-28 Thread lucas
yes massimo, that almost worked. as suggested, i first changed it under the db.py model and then set the request.vars.state_id to the state_id variable just before creating and assigning the SQLFORM. it threw back an empty set of counties. so i thought maybe request is reaching that deep int

[web2py] Re: model define_table select

2016-03-27 Thread Massimo Di Pierro
Correction. replace IS_IN_DB(db_region(*db_region.post.state_id==db_region.county.state_id*) with IS_IN_DB(db_region(*db_region.county.state_id == **request.vars.state_id*) On Sunday, 27 March 2016 10:16:13 UTC-5, Massimo Di Pierro wrote: > > replace > > IS_IN_DB(db_region(*db_region.post.state

[web2py] Re: model define_table select

2016-03-27 Thread Massimo Di Pierro
replace IS_IN_DB(db_region(*db_region.post.state_id==db_region.county.state_id*) with IS_IN_DB(db_region(*db_region.post.state_id==request.vars.state_id*) On Saturday, 26 March 2016 12:24:52 UTC-5, lucas wrote: > > hello one and all, > > ok, under the DAL model, say i have a county and zip code

[web2py] Re: model define_table select

2016-03-26 Thread Leonel Câmara
Are you trying to do a foreign key across databases? That's just a bad idea and I don't think the DAL supports it because it doesn't work on most backends (with good reason) anyway. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sou