public function outputProfiling($blnPrintOutput = true)
    {
        $strPath = isset($_SERVER['REQUEST_URI']) ?
            $_SERVER['REQUEST_URI'] :
            $_SERVER['PHP_SELF'];

        $strOut = '<div class="qDbProfile">';
        if ($this->blnEnableProfiling) {
            $strOut .= sprintf('<form method="post" id="frmDbProfile%s" action="%s/profile.php"><div>',
                $this->intDatabaseIndex, QCUBED_PHP_URL);
            $strOut .= sprintf('<input type="hidden" name="strProfileData" value="%s" />',
                base64_encode(serialize($this->strProfileArray)));
            $strOut .= sprintf('<input type="hidden" name="intDatabaseIndex" value="%s" />', $this->intDatabaseIndex);
            $strOut .= sprintf('<input type="hidden" name="strReferrer" value="%s" /></div></form>',
                htmlentities($strPath));

            $intCount = round(count($this->strProfileArray));
            if ($intCount == 0) {
                $strQueryString = 'No queries';
            } else {
                if ($intCount == 1) {
                    $strQueryString = '1 query';
                } else {
                    $strQueryString = $intCount . ' queries';
                }
            }

            $strOut .= sprintf('<b>PROFILING INFORMATION FOR DATABASE CONNECTION #%s</b>: %s performed.  Please <a href="#" onclick="var frmDbProfile = document.getElementById(\'frmDbProfile%s\'); frmDbProfile.target = \'_blank\'; frmDbProfile.submit(); return false;">click here to view profiling detail</a><br />',
                $this->intDatabaseIndex, $strQueryString, $this->intDatabaseIndex);
        } else {
            $strOut .= '<form></form><b>Profiling was not enabled for this database connection (#' . $this->intDatabaseIndex . ').</b>  To enable, ensure that ENABLE_PROFILING is set to TRUE.';
        }
        $strOut .= '</div>';

        $strOut .= '<script>$j(function() {$j(".qDbProfile").draggable();});</script>';    // make it draggable so you can move it out of the way if needed.

        if ($blnPrintOutput) {
            print ($strOut);
            return null;
        } else {
            return $strOut;
        }
    }