[web2py] Re: .select(db.table.ALL)
Hi Anthony, Thanks for your reply, added it to my notes on .ALL Best regards, Annet -- --- 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/groups/opt_out.
[web2py] Re: .select(db.table.ALL)
recap: - db.table1.ALL is just a shortcut to db.table1.field1, db.table1.field2, db.table1.field3, etc etc etc - select() without arguments selects all fields for all tables involved. - if you pass something explicit to select() , you get just what you asked for tl;dr : exactly what you observed. ALL is useful, e.g., when you need all fields of table1 but only some fields of table2. Instead of doing select(*db.table1.field1, db.table1.field2, db.table1.field3, db.table1.field4, db.table1.field5, * *db.table2.field1, db.table2.field2* ) you can do select(*db.table1.ALL*, *db.table2.field1, db.table2.field2*) -- --- 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/groups/opt_out.
[web2py] Re: .select(db.table.ALL)
Hi, Thanks for your answer, I just wasn't sure I could leave out the .ALL, now I know for sure ... Annet -- --- 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/groups/opt_out.
[web2py] Re: .select(db.table.ALL)
Note, .ALL is also useful when you don't want to specify any query: db().select(db.mytable.ALL) That will give you all the records and all the fields in db.mytable. If you do specify a query, then calling .select() with no fields is equivalent to using .ALL. Anthony On Friday, April 5, 2013 12:58:16 PM UTC-4, Annet wrote: Hi, Thanks for your answer, I just wasn't sure I could leave out the .ALL, now I know for sure ... Annet -- --- 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/groups/opt_out.