logging all queries after execution in codeigniter

前端 未结 2 920
庸人自扰
庸人自扰 2020-12-10 04:05

i want to log all queries after execution using hooks. -i enabled hooks in config.php -this is my hook-->

 $hook[\'post_controller\'] = array(    
    \'clas         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-10 04:53

    Your Code looks fine - the only reason why this doesn't work is in your DB Configuration - take a look @your DB Connection in the database.php under application/config/

    There is an option "save_queries" which should be set to true

    $db['default'] = array(
        ...
        'save_queries' => TRUE
    );
    

提交回复
热议问题