From: Joseph Chereshnovsky [mailto:Joseph007@ukr.net]
Sent: Wednesday, July 15, 2009 11:17 PM
To: 'Mauro Spivak'
Subject: RE: [fw-db] Zend_Db + MySQL + New MVC Model
Hi,
You can set this in config file: resources.db.params.charset = "utf8"
so the overal DB resource config will look like:
;; Database
resources.db.adapter = "pdo_mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "user"
resources.db.params.password = "1234"
resources.db.params.dbname = "mydatabase"
resources.db.isDefaultTableAdapter = true
resources.db.params.charset = "utf8"
Regards,
Joseph Chereshnovsky
-----Original Message-----
From: Mauro Spivak [mailto:mauros@gmail.com]
Sent: Wednesday, July 15, 2009 10:54 PM
To: fw-db@lists.zend.com
Subject: [fw-db] Zend_Db + MySQL + New MVC Model
Hi guys,
I'm starting a new development on the lastest ZF (1.8). Seems like the MVC
suggested structure changed a bit and DBs are now "factored" internally by
the framework. Am I right? Where should I place the old "SET NAMES 'utf8'"
in order to get MySQL properly working with UTF8? I used to place it in the
bootstrap but now it's a class and I don't know how to instantiate the DB
adapter from there.
Do I make myself clear? The question is: How to get MySQL properly working
with UTF8 in the new MVC structure?
Cheers,
Mauro
没有评论:
发表评论