I am trying to query an external MySQL database in my class but can't seem to figure out how to do so. I am using Propel and I have previously used Propel::getConnection() to make custom queries, however, only to the database that it is connected to.
Is there any way I can do this by using built-in Symfony plugins?
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK
Yes, just add more connections into your databases.yml, and make the necessary reference in the schema.yml that you wish to use the second database. This link will become obvious if you open up these files as they are presently.
Then when you access the new db objects, it will connect to the secondary database automatically.Remember Palestine