Saturday, 10 August 2013

Where is $row defined?

Where is $row defined?

In the code below, can someone tell me where the variable $row is coming
from in the foreach statement?
public function getProcResultSet($cmd)
{
try
{
$meta = $cmd->result_metadata();
while ($field = $meta->fetch_field())
{
$params[] = &$row[$field->name];
}
call_user_func_array(array(
$cmd,
'bind_result'), $params);
while ($cmd->fetch())
{
foreach ($row as $key => $val)
{
$c[$key] = $val;
}
$results[] = $c;
}
return $results;
}
catch (Exception $e)
{
logToFile("Exception: " . $e);
return resultFailedUnknown();
}

No comments:

Post a Comment