2008年8月22日星期五

[fw-db] Couldn't fetch mysqli

Hi,

I'm connecting to my local MySQL database using Mysqli adapter and using Zend_Db_Table to fetch all rows like that:

function loadMembers()

    {

    $session = new Zend_Session_Namespace('Network');

    $profil = new Profils(array('db' => $session->networkDb));

    $result = $profil->fetchAll(null, null, 10, null);

    return $result;

    }


$session->networkDb is assigned when the user logs in and it is set to null when he logs out.
The function above can be called only once after the user has logged in and it throws the following error with all subsequent calls:

mysqli::query(): Couldn't fetch mysqli' faultDetail:'/Users/sarbogast/dev/myapp/library/Zend/Db/Adapter/Mysqli.php on line 186'

I've read that there is a known bug in PHP and Mysqli that can be the source of this problem, but I can't find a way to work around it in the context of Zend.

Does anyone have an idea?

--
Sébastien Arbogast

http://sebastien-arbogast.com

没有评论: