Hey
I do use your CRLab Solution myDIRECT 4.25 and mySQL Server 5.0.45-community-nt
So I do have 4 tables with different offers.
My boss wants, that the Invoice Number each year begins from 0. - So I think, that an extra invoice tabel with an autoincrement field will not be the right.
I have played around and have found out, that a Union of all 4 offer tables will bring me the max value of the invoice, which is saved in the offers table.
But is this SQL-technical correct!? - To read out a max value & add it with +1 and write it back as new invoice number!? - What is with the situation, when two people try to get the same number at the same time!? - Do I have to lock!?
Should I make a SP!?
Hope you understand what I try to do and maybe you can give me a good tipp, that will help me.
THX
How to do it correct
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24