I have an application that stores information on invoices of a company. However, this company can have many branches, and each of them must have a unique invoicing sequence. However, all invoices are stored in the same table, I have search for a solution here in the forum and in google for a way to have two different auto-increments for one table. I know basically no databases will allow this (MySQL with MyISAM can, but I wanted something that would be portable).
So the question is what would be the best solution to this problem with Web2Py? Right now I'm running a query for the last insert and manually assign the next number to the invoice. Is there any better solution? Because with this solution I'm worried of concurrency problem that may arise if two invoices are created at the same time. Thanks for all the help. -- 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/groups/opt_out.