PMA\libraries\DatabaseInterface::_dbgQuery PHP Method

_dbgQuery() private method

Stores query data into session data for debugging purposes
private _dbgQuery ( string $query, object $link, object | boolean $result, integer $time ) : void
$query string Query text
$link object database link
$result object | boolean Query result
$time integer Time to execute query
return void
    private function _dbgQuery($query, $link, $result, $time)
    {
        $dbgInfo = array();
        $error_message = $this->getError($link);
        if ($result == false && is_string($error_message)) {
            $dbgInfo['error'] = '<span style="color:red">' . htmlspecialchars($error_message) . '</span>';
        }
        $dbgInfo['query'] = htmlspecialchars($query);
        $dbgInfo['time'] = $time;
        // Get and slightly format backtrace, this is used
        // in the javascript console.
        // Strip call to _dbgQuery
        $dbgInfo['trace'] = Error::processBacktrace(array_slice(debug_backtrace(), 1));
        $dbgInfo['hash'] = md5($query);
        $_SESSION['debug']['queries'][] = $dbgInfo;
    }