顯示具有 doctrine 標籤的文章。 顯示所有文章
顯示具有 doctrine 標籤的文章。 顯示所有文章

2010年6月25日 星期五

Doctrine yaml table charset

MyCustomOptionRecord:
columns:
name: string
options:
collate: utf8_unicode_ci
charset: utf8

2010年6月20日 星期日

doctrine 中文亂碼

默認在數據庫插入數據庫的時候,如果是中文會產生亂碼.其實解決方法也很簡單,在正常的連接後設置一下Charset就行了.
$manager = Doctrine_Manager::getInstance();
$conn = $manager->connection(DSN, 'doctrine');
//加上下面的,並設置為utf8
$conn->setCharset("utf8");
$manager->setAttribute('model_loading', 'conservative');

摘自:http://www.liifei.com/?p=370

wibiya widget