Avoiding multiple database connection with MongoDB - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Avoiding multiple database connection with MongoDB (/showthread.php?tid=31852) |
Avoiding multiple database connection with MongoDB - El Forum - 07-04-2010 [eluser]sdotsen[/eluser] I've enabled my code to use any existing connection that's available to the database, but I wasn't sure if I'm doing this right. Ive been a procedural PHP developer for many years now and CI is my first real taste with OOP. With that said, given the code below, I'm wondering if I'm doing this right. I have a model file called "database_conn.php" that I call from my models. Code: class Database_Conn extends Model { A typical model looks like this: Code: class Home_model extends Model { |