Ramos: Other posibility is create a form using grid and then choose columns you want to show, for example:
def query_venta(): query = (db.tventa.id >= 3) & (db.tventa.id <= 7) columns = [db.tventa.fecha, db.tventa.monto]] grid=SQLFORM.grid(query,field_id = db.tventa.id,fields=columns) ------------------------ query_venta.html {{=grid}} Regards El jueves, 9 de junio de 2016, 12:08:39 (UTC-3), Ramos escribió: > > Yes it works now. > > Too bad that i cannot only return some of the columns. It would be perfect > because i have many columns and i have to scroll to the right a lot. > > 2016-06-09 14:55 GMT+01:00 isi_jca <juliocesa...@gmail.com <javascript:>>: > >> Hello!!! >> >> Try using Parenthesis, for example: >> >> (db.tventa.id >= 3) & (db.tventa.id <= 7) >> >> >> Result Set >> tventa.id >> <http://127.0.0.1:8000/Cascada/appadmin/select/db?orderby=tventa.id> >> tventa.fecha >> <http://127.0.0.1:8000/Cascada/appadmin/select/db?orderby=tventa.fecha> >> tventa.vendedor >> <http://127.0.0.1:8000/Cascada/appadmin/select/db?orderby=tventa.vendedor> >> tventa.monto >> <http://127.0.0.1:8000/Cascada/appadmin/select/db?orderby=tventa.monto> >> 3 <http://127.0.0.1:8000/Cascada/appadmin/update/db/tventa/3> 2016-05-04 >> Pedro 900.00 >> 4 <http://127.0.0.1:8000/Cascada/appadmin/update/db/tventa/4> 2016-05-05 >> Andrés 1050.00 >> 5 <http://127.0.0.1:8000/Cascada/appadmin/update/db/tventa/5> 2016-06-08 >> Pepe 123.31 >> 6 <http://127.0.0.1:8000/Cascada/appadmin/update/db/tventa/6> 2016-06-09 >> Pepe 52.36 >> 7 <http://127.0.0.1:8000/Cascada/appadmin/update/db/tventa/7> 2016-06-10 >> Maria 12.36 >> Regards. >> >> >> El jueves, 9 de junio de 2016, 6:29:39 (UTC-3), Ramos escribió: >>> >>> hello >>> how can i, via admin query a table using in the input box more than 1 >>> field to query? >>> >>> i tried >>> db.amostras.n==203027 & db.amostras.estante1=="_E_000" - >error >>> db.amostras.n==203027 and db.amostras.estante1=="_E_000" -> no error but >>> seems to search only the second field (db.amostras.estante1=="_E_000) >>> >>> how can i query based on 2 fields? >>> >>> Regards >>> António >>> >>> -- >> 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+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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.