bob
|
| Posted: 11/30/2002, 12:48 PM |
|
What is the best way to setup a multi-company environment within an application? Is there a good example which handles registration and segragation of records within a same database. I need to share a common database with these companies and allow them to sign up for it themselves.
|
|
|
 |
DaveRexel
|
| Posted: 11/30/2002, 5:16 PM |
|
Hello Bob
I have solved this scenario in co-operation with three charity organisations that needed to share the same database for reasons of their own.
I made sure that I kept the data separate by using a category table containing an entry for each company. This table was called whenever separation was neccessary in any query. Other operations which needed common access were easy to implement by just not using the above table. Because they were broke but very deserving we built this for free with AMD/Apache/PHP/MySQL and made a lot of new friends.
Now that the data is separated let's make sure they cannot edit each others records as below
In CCS->Project Settings->Security-> you have the "Advanced" button
Here you can give a prefix to the session variables like
co1UserID
co2UserID
etc
Oh yes! the key to using CCS with this is that each entity has its own folder/CCS-project on the website addressing the same DB-tables but separated by the above two strategies. So there was no problem with diffent colour schemes, graphics and whatever.
Because the session variables are so easy to set in CCS this works perfectly.
The customers are very happy and their sys-admins are still scratching their heads wondering how I did it.
Easy! with CCS
Greetings
Dave
|
|
|
 |
James
|
| Posted: 11/30/2002, 9:18 PM |
|
|
|
|
 |
|