CodeIgniter Forums
DataMapper, multiple databases. - 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: DataMapper, multiple databases. (/showthread.php?tid=44979)



DataMapper, multiple databases. - El Forum - 09-02-2011

[eluser]Unknown[/eluser]
I want to use two different database servers ( same database driver ) in my application, but i want to use both of them each time a script runs as :

1)Get some data from database1 with DataMapper
2)Get some data from database2 with DataMapper
3)Render a view with both data to the user.

The two databases present different and unrelated with each other models to the user.

My initial idea was to load two different DataMapper libraries, but i suppose one of them needs to be configured to look for its models in another folder (other than /model).

Is that possible ? Or is there a better alternative ?

PS: wrong section Sad Soz