getLog();
endforeach;
endif;
if ($noLogs || isset($_forced_from_dbo_)):
foreach ($logs as $source => $logInfo):
$text = $logInfo['count'] > 1 ? 'queries' : 'query';
printf(
'
',
preg_replace('/[^A-Za-z0-9_]/', '_', uniqid(time(), true))
);
printf('(%s) %s %s took %s ms', $source, $logInfo['count'], $text, $logInfo['time']);
?>
Nr | Query | Error | Affected | Num. rows | Took (ms) |
$i) :
$i += array('error' => '');
if (!empty($i['params']) && is_array($i['params'])) {
$bindParam = $bindType = null;
if (preg_match('/.+ :.+/', $i['query'])) {
$bindType = true;
}
foreach ($i['params'] as $bindKey => $bindVal) {
if ($bindType === true) {
$bindParam .= h($bindKey) . " => " . h($bindVal) . ", ";
} else {
$bindParam .= h($bindVal) . ", ";
}
}
$i['query'] .= " , params[ " . rtrim($bindParam, ', ') . " ]";
}
printf('%d | %s | %s | %d | %d | %d |
%s',
$k + 1,
h($i['query']),
$i['error'],
$i['affected'],
$i['numRows'],
$i['took'],
"\n"
);
endforeach;
?>
%s', __d('cake_dev', 'Encountered unexpected %s. Cannot generate SQL log.', '$logs'));
endif;