CodeIgniter Forums

Full Version: Multi-database Project
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello CodeIgniter gurus!

Currently, I have two separated same projects only using different databases. When ever I do changes in the code, I've to update it on both projects which is a little bit a pain in the back.

I've an idea create a single project but using 3 (or more, depends on clients) databases.

1st database - MASTER DB.
This database has users table, clients table (with information about other databases, etc).

2nd database - Client One && 3rd database - Client Two
Structure in both databases are the same only different data.

P.S I can't merge 2nd and 3rd database into one database because I've created a web application for already existing system.

What would be the best way to do this?
I can create an authorization system which takes data from MASTER database. When user log-in, it saves in sessions which database it should work with. How to handle this multi-database problem? I should create my own Database model or what? :?

If you've any questions, feel free to ask.


Maybe this is what you are looking for ( )?