Re: [web2py] SQLFORM with specific record

2019-02-22 Thread Christian Varas
Thanks Duncan My fault! :P I was pointing to another table and I was missing the ".select()" and at the end... stupid me haha like this: record = db((db.*lugar*.id == request.args(0)) & (db.*ruta*.user_id == auth.user['id'])) Whit this works perfect: record = db((db.lugar.lugar_id == request.args

Re: [web2py] SQLFORM with specific record

2019-02-22 Thread Ben Duncan
Are you trying to join to db's ? If not, then try : ROW = db(db.lugar.user_id == auth.user['id']).select() or ROW = db.lugar[auth_user['id']] See: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Shortcuts *Ben Duncan* DBA / Chief Software Architect Mississippi State

[web2py] SQLFORM with specific record

2019-02-21 Thread Christian Varas
Hello ! I'm trying to get a sqlform that display a specific entry, i've been able to get it work like in the book but just with one condition like this: record = db.rutas(request.args(0)) i need to do something like this: record = db.rutas.id == request.args(0) and db.lugar.user_id == auth.user['i