Using Different Databases with Zend Framework 1.10.4+

Jeroen Kep­pens wrote a very good arti­cle about using mul­ti­ple data­bases that I defen­itely found very useful;

A while ago I wrote about a cus­tom appli­ca­tion resource for load­ing mul­ti­ple DBs. I received a lot of ques­tions and decided it was time for a follow-up on how to use mul­ti­ple DBs in ZF.

One of the first exper­i­ments I did with Appli­ca­tion Resources was writ­ing a appli­ca­tion resource for load­ing mul­ti­ple data­bases. We gen­er­ally con­nect to mul­ti­ple data­bases in report­ing appli­ca­tions or in scripts where we want to aggre­gate data from the main data­base to an off­site data­base. Since that post I received a lot of ques­tions on how to inte­grate this in the mod­els and how to join dif­fer­ent data­bases in queries using zend frame­work. In this post I’ll explore how to do both. Since in the mean­time some­one has used the idea and added a mul­ti­ple db resource to the Zend Frame­work, I will use the “offi­cial” appli­ca­tion resource loader instead of my own.

This tuto­r­ial was made with Zend Frame­work 1.10.4.

via Jeroen Kep­pens

Tags: , ,

Leave a Comment

*

Get Adobe Flash playerPlugin by wpburn.com wordpress themes