public static function sql($query, $sqlName = 'SQL Query', $nl2br = false)
    {
        // Joomla hack
        if (defined('_JEXEC')) {
            $config = new JConfig();
            $prefix = $config->dbprefix;
            $query  = str_replace('#__', $prefix, $query);
        }

        if (class_exists('JBDump_SqlFormatter')) {
            $sqlHtml = JBDump_SqlFormatter::format($query);
            return self::i()->dump($sqlHtml, $sqlName . '::html');
        }

        return self::i()->dump($query, $sqlName . '::html');
    }
public static function sql($query, $sqlName = 'SQL Query', $nl2br = false)
    {
        // Joomla hack
        if (defined('_JEXEC')) {
            $config = new JConfig();
            $prefix = $config->dbprefix;
            $query  = str_replace('#__', $prefix, $query);
        }

        if (class_exists('JBDump_SqlFormatter')) {
            $sqlHtml = JBDump_SqlFormatter::format($query);
            return self::i()->dump($sqlHtml, $sqlName . '::html');
        }

        return self::i()->dump($query, $sqlName . '::html');
    }
public static function sql ( $ query , $ sqlName = 'SQL Query' , $ nl2br = false ) { // Joomla hack
 if ( defined ( '_JEXEC' ) ) { $ config = new JConfig ( ) ; $ prefix = $ config -> dbprefix ; $ query = str_replace ( '#__' , $ prefix , $ query ) ; } if ( class_exists ( 'JBDump_SqlFormatter' ) ) { $ sqlHtml = JBDump_SqlFormatter :: format ( $ query ) ; return self :: i ( ) -> dump ( $ sqlHtml , $ sqlName . '::html' ) ; } return self :: i ( ) -> dump ( $ query , $ sqlName . '::html' ) ; }
Highlight SQL query
@param        $query
@param string $sqlName
@param bool   $nl2br
@return JBDump
Highlight SQL query