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

"Dynamic" db

$
0
0
What I'm trying to achieve is the following:

  • There is no guest access to the application, login is required
  • On the login form, the user has to choose a database identifier (dbid)
  • During authentication, a connection string is generated from the dbid and is used together with the username and password to try to connect to the database.
  • Authentication is actually performed by the DB server. If the connection is successful, the connection string, username and password are saved in the user's session.
  • For subsequent requests, these saved values are used to connect to the database.


Any advice? Could I still use the standard CApplication->db component? When would be the right time (place) to retrieve the connection details and initialize the connection?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



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