Individual Database For Every Client

How to handle client based database connection in yii(not pre configured in main.php). I want to create dynamic database connection.

Main Database:



main_table -


clientname|database|password -


yiitech |yiitech |ClientDBPassword


www.domain.com/yiitech’ using this URL i have to check the client name and client db in main database. If the client is available i have to create the new db connection with client based DB.

Note: The login details with new db connection only.

Sample DB List

maindatabase

yiitech

client_1_database

client_2_database

client_3_database

I find one link Is it correct?

http://stackoverflow.com/questions/9684218/yii-dynamic-db-connection-according-to-user

see 2nd answer

[color="#006400"]/* Moved from "Yii-powered Application" to "General Discussion for Yii 1.1.x" */[/color]