I'm creating a project in symfony, but suddenly I'm having trouble when there are two databases for my project like this:
all: gapi_1:
class: sfDoctrineDatabase
param:
dsn: mysql:host=localhost;dbname=gapi_1
username: root
password:
gapi_2:
class: sfDoctrineDatabase
param:
dsn: mysql:host=localhost;dbname=gapi_2
username: root
password:
I'm very confused about how to access database in my action pages. Please help me to access the symfony multiple database in same action.class.php file.