Hi All,
I have a php framework that has a MySQL database with several tables, in each table there is a ‘id’ column and a ‘client_id’ column, this is so I can have several clients all on the same database. They should only be querying their own data using the ‘client_id’ column.
My question is I have certain tables that use ‘a_i’ for the ‘id’ and this is used as the invoice number or order number, is there a way I can have each client to have their numbers be consecutive and not random (due to another client using the id)? for example to have numbering as 1, 2, 3… and not 1, 5, 11
My initial thought is no but I am no PHP genius, should I scrap the id as the invoice/order number and introduce another column which keeps the numbers consecutive for each client?
Your thoughts are welcome and appreciated.