【问题标题】:execute a query right after connexion in cakePHP在 cakePHP 中连接后立即执行查询
【发布时间】:2009-12-13 18:57:12
【问题描述】:

我想在连接数据库后立即执行 mysql 查询以启用 utf-8

SET NAMES 'utf-8' COLLATE 'utf8_unicode_ci' 

我想要一个针对整个应用程序的特定模型的答案

【问题讨论】:

    标签: php database unicode cakephp utf-8


    【解决方案1】:

    在您的数据库文件中将编码设置为 utf8。这将导致 cakephp 运行集合名称查询。

    http://book.cakephp.org/view/331/Cake-Database-Configuration

    【讨论】:

      猜你喜欢
      • 2018-10-14
      • 2020-12-08
      • 2017-07-26
      • 2015-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-26
      • 1970-01-01
      相关资源
      最近更新 更多