Due to how the data I work on is located I need to be able for a user to select the database to use on a per user case.
I have looked at guides on how to use several databases but this does not exactly fit my problem. The system can have an arbitrary number of databases and I need to easily be able to switch between them.
My initial though was to modify the main configuration file (config/main.php) so the name of the selected database is fetched from every users cookie and updated accordingly. The problem was that
Yii::app()->request
is undefined in that file, making it impossible to read a users cookie.
Is this even a remotely realistic idea to solve this problem? Any idea on how this can be solved?
Regards
Waws