logging all queries after execution in codeigniter

前端 未结 2 914
庸人自扰
庸人自扰 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:51

    For me it only worked when I define de $hook array in config/hooks.php .

    0 讨论(0)
  • 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
    );
    
    0 讨论(0)
提交回复
热议问题