开发者

Multiple Database in Symfony

What can i do for change my database conection in Symfony?

I have my database.yml wi开发者_高级运维th 3 different conection and I want to change "on fly" of database.

Thanks for your help!


You can bind tables to a specific connection - then doctrine creates them there, and whenever you use them, doctrine automatically knows which connection to use.

This example is from The symfony and Doctrine book, chapter 2:

Client:
  connection: master
  columns:
    name: string(255)
    username: string(255)
    password: string(255)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜