首页 > 数据库技术 > 详细

yii 显示mysql执行语句

时间:2015-05-07 18:16:45      阅读:183      评论:0      收藏:0      [点我收藏+]

访问protected/config/main.php修改如下 

‘db‘=>array(
   ‘connectionString‘ => ‘mysql:host=localhost;dbname=yii_computer‘,
   ‘emulatePrepare‘ => true,
   ‘username‘ => ‘root‘,
   ‘password‘ => ‘‘,
   ‘charset‘ => ‘utf8‘,
   ‘tablePrefix‘ => ‘yii_computer_‘,
   //让捆绑的变量显示出来
   ‘enableProfiling‘ => YII_DEBUG,
   ‘enableParamLogging‘ =>YII_DEBUG,
  ),

 

‘log‘=>array(
   ‘class‘=>‘CLogRouter‘,
   ‘routes‘=>array(
    array(
     ‘class‘=>‘CFileLogRoute‘,
     ‘levels‘=>‘error, warning‘,
    ),
    // uncomment the following to show log messages on web pages
    
    array(
     ‘class‘=>‘CWebLogRoute‘,

     //添加的内容
     ‘levels‘ =>‘trace‘,
     ‘categories‘ => ‘system.db*‘,
    ),
   
   ),
  ),

yii 显示mysql执行语句

原文:http://www.cnblogs.com/zwue/p/4485422.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!