Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Change 'db' Component Schema Or Connectionstring Dynamically

$
0
0
Is it possible to change the 'db' component's connectionString or its schema, dynamically.
I am trying to build an application in which the user login data (and some more general stuff) is stored in a common database, whereas the user-specific details are stored in another database unique to the user.

I want to access the common database when the user is logging, and if successful, switch the database in the 'db' component to the user specific database and perform further tasks based on the user's custom settings.

Is it possible to achieve this without using two db connections (as mentioned in the link Multiple-database support in Yii).

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>