如何在CodeIgniter模型中动态更改数据库设置'db_debug'的值? [重复]

This question already has an answer here:

A piece of database setting in my CodeIgniter development environment.

$db['development']['pconnect'] = TRUE;
$db['development']['db_debug'] = TRUE;
$db['development']['cache_on'] = FALSE;

But there is a model that I should turn the value of 'db_debug' into FALSE, because the debug info will interrupt the execution of my PHP code. How can I do that?

I have Google it for a long time, I am quite appreciate that someone could solve my problem.

</div>

You can access db_debug as a public variable:

$this->db->db_debug = FALSE;