News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Vid Luther's Blog:
Talking to multiple databases with Symfony 1.2
August 24, 2009 @ 11:29:46

Vid Luther has a new post today looking at connecting to multiple databases inside of your Symfony framework application. The key is in setting up your YAML files the right way.

Since you need a schema.yml or xml file, you can either generate one using a tool that will take your data defintion and create the YAML for you, or you can cheat and build a temp project, configure it to work with earlyprototype , and then do a symfony propel:build-schema . This will give you a schema.yml file in your config directory.

He walks you through the creation of two simple YAML files with database connection information and how to drop their contents over into the main database.yml file and some code to run the queries on the different databases.

0 comments voice your opinion now!
symfony framework database multiple tutorial


blog comments powered by Disqus

Similar Posts

Tim Koschuetzki's Blog: CakePHP Pluralize Helper

Cormac's Blog: Fast server-side rejection of large image uploads using $_FILES

Mike Naberezny's Blog: Wrapping PHP Functions for Testability

PHPMaster.com: Data Structures for PHP Devs: Graphs

The Bakery: CakeSWXPHP, ACL and AssetPackager


Community Events





Don't see your event here?
Let us know!


voicesoftheelephpant deployment community laravel api developer interview list library introduction tips bugfix release series conference podcast framework symfony zendserver language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework