public function tryQuery($query, $link = null, $options = 0, $cache_affected_rows = true)
{
$debug = $GLOBALS['cfg']['DBG']['sql'];
$link = $this->getLink($link);
if ($link === false) {
return false;
}
if ($debug) {
$time = microtime(true);
}
$result = $this->_extension->realQuery($query, $link, $options);
if ($cache_affected_rows) {
$GLOBALS['cached_affected_rows'] = $this->affectedRows($link, false);
}
if ($debug) {
$time = microtime(true) - $time;
$this->_dbgQuery($query, $link, $result, $time);
if ($GLOBALS['cfg']['DBG']['sqllog']) {
openlog('phpMyAdmin', LOG_NDELAY | LOG_PID, LOG_USER);
syslog(LOG_INFO, 'SQL[' . basename($_SERVER['SCRIPT_NAME']) . ']: ' . sprintf('%0.3f', $time) . ' > ' . $query);
}
}
if (!empty($result) && Tracker::isActive()) {
Tracker::handleQuery($query);
}
return $result;
}