Hello, I have one table with orders,invoices,warehouse documents, diffrence is in document type. I want to add automaticly unique number which start numbering from 1 in each month ie: 1/01/OR , 1/01/IN .... There can work few users on the same table. How I can create this number. When I use select max(id)+1 sometimes it happend that it return the same number to few users. Also there will be document status (CLOSED, OPEN), how to disable possibility to edit documents with CLOSED status.
Login or Sign Up
- Log in with