[SOLVED] Select Database based on login information |
4/28/2017 20:43:32 | |
| PHPRunner General questions | ||
|
I'm looking for a way to have a project connect to the main database based on the login information entered by the user. For example you create the exact same CRM for a few different companies with different server connections but everytime you build a new version, you have to upload the changed files to multiple servers. This can obviously be very time consuming when your goal is to have 100s of clients down the road. |
||
|
A
|
alicea 4/28/2017 |
|
See if this post helps. |
|
|
|
need2sleep authorDevClub member 5/3/2017 |
|
thanks for that! I remember reading this article long time ago and couldn't find it. The only thing that I can't wrap my head around is if I associate a "DBConnectionField" on the table of usernames, will I have to copy all usernames from each database to one main one? Has anyone tried this method? |
|
|
|
mbintex 5/3/2017 |
|
Asking me the same thing. |
|
|
S
|
stiven 5/8/2017 |
|
or maybe you can just have a separate database just to store customers company information... maybe just like company name or some type of access code... when they entered the access code then you will know which database you can redirect the users to ... using this method http://asprunner.com/forums/topic/20126-single-project-working-with-several-identical-databases/ |
|
|
|
need2sleep authorDevClub member 5/8/2017 |
|
or maybe you can just have a separate database just to store customers company information... maybe just like company name or some type of access code... when they entered the access code then you will know which database you can redirect the users to ... using this method http://asprunner.com/forums/topic/20126-single-project-working-with-several-identical-databases/
|
|
|
|
Sergey Kornilov admin 5/8/2017 |
|
Storing images in the database seems like an easier option. Storing it on file system is also possible but more complicated and you will need to maintain a separate folder for each company somewhere on harddrive. Not impossible, but a bit more work. |
|