On Sunday, January 6, 2019 at 9:15:41 AM UTC-5, mostwanted wrote: > > Hey Anthony, thanks for the heads up in the garbage code in the controller > i will address it, with regards to deleting invoices i want to be able to > delete all invoices in the db.invoice table but only for a specific > selected client. I want to be able to delete an entire invoice by clicking > the link once. >
Then you would need a query like: db(db.invoice.client = some_client_id).delete() You would want to make sure the current user is authorized to delete invoices for some_client_id (specifically, if some_client_id comes from the browser, be sure to validate it). Also, in the UI, you should probably make it clear what will happen, as "Delete Invoice" makes me think I'm deleting only the current invoice, not all invoices. 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.