是否有本地mysql_free_result的Kohana等价物?

时间:2009-08-10 07:42:22

标签: kohana

就像问题

一样

1 个答案:

答案 0 :(得分:1)

是的,只需取消设置()结果对象即可。 然后,结果对象将调用mysql_free_result()

<强> e.g。

// $result now holds a Datbase_Result object
$result = Database::instance()->query('SELECT * FROM table');

// To free the result, simply destroy the variable through means of unset()
unset($result);

// Result memory has now been freed