Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher
function update($sql, $params = false, $callHooks = true, $dieOnError = true) {
if ($callHooks === true && checkPhpVersion('4.3.0')) {
$trace = debug_backtrace();
// Call hooks based on the calling entity, assuming
// this method is only called by a subclass. Results
// in hook calls named e.g. "SessionDAO::_updateSession"
$value = null;
if (HookRegistry::call($trace[1]['class'] . '::_' . $trace[1]['function'], array(&$sql, &$params, &$value))) {
return $value;
}
}
$this->_dataSource->execute($sql, $params !== false && !is_array($params) ? array($params) : $params);
if ($dieOnError && $this->_dataSource->errorNo()) {
fatalError('DB Error: ' . $this->_dataSource->errorMsg());
}
return $this->_dataSource->errorNo() == 0 ? true : false;
}
Users browsing this forum: No registered users and 2 guests