returning instances of stdClass populated by binding

Assuming a working mysqli prepared and executed statement, is there any reason why I cannot populate
properties on an instance of stdClass and return it to the caller to fetch() the results? E.g.,

$result = new stdClass();
if (!$statement->bind_result(
$result->familyID, /* 000 /
$result->username, /
001 /
$result->workerID)) /
002 */
{
throw new DBException("families bind_result failed ");
}

    return array('row' => $result, 'statement' => $statement);

I am getting all kinds of apache hangs and nondeterminism in 5.3.0… wondered if this is suspect or what.

Sponsor our Newsletter | Privacy Policy | Terms of Service