symfony connect database configuration
ดูที่นี่ http://www.symfony-project.org/book/1_0/08-Inside-the-Model-Layer นะครับ Copy มาให้ดูด้วยนะครับ
prod:
propel:
param:
hostspec: mydataserver
username: myusername
password: xxxxxxxxxxall:
propel:
class: sfPropelDatabase
param:
phptype: mysql # Database vendor
hostspec: localhost
database: blog
username: login
password: passwd
port: 80
encoding: utf8 # Default charset for table creation
persistent: true # Use persistent connections
phptype ที่สามารถใช้ได้คือ
mysqlsqlserverpgsqlsqliteoracle
หรือจะใช้การ connect แบบ ย่อก็ได้
all:
propel:
class: sfPropelDatabase
param:
dsn: mysql://login:passwd@localhost/blog
ใครจะใช้แบบใหนก็ได้ ตามสะดวกครับ