I am using codeigniter to develop my web based application. This will be used by various different clients and each will have there own database but same codebase.
I want to be able to set the name of database in database.php based on the clients who access it i.e based on the url. So if clientA.com access its then it should set the database name to clintA and if clientB.com access it then it should set it to clientB.com.
Any idea as how should I approch this.