protected function print_debug($sql, array $params=null, $obj=null) {
        if (!$this->get_debug()) {
            return;
        }
        if (CLI_SCRIPT) {
            $separator = "--------------------------------\n";
            echo $separator;
            echo "{$sql}\n";
            if (!is_null($params)) {
                echo "[" . var_export($params, true) . "]\n";
            }
            echo $separator;
        } else if (AJAX_SCRIPT) {
            $separator = "--------------------------------";
            error_log($separator);
            error_log($sql);
            if (!is_null($params)) {
                error_log("[" . var_export($params, true) . "]");
            }
            error_log($separator);
        } else {
            $separator = "<hr />\n";
            echo $separator;
            echo s($sql) . "\n";
            if (!is_null($params)) {
                echo "[" . s(var_export($params, true)) . "]\n";
            }
            echo $separator;
        }
    }
protected function print_debug($sql, array $params=null, $obj=null) {
        if (!$this->get_debug()) {
            return;
        }
        if (CLI_SCRIPT) {
            $separator = "--------------------------------\n";
            echo $separator;
            echo "{$sql}\n";
            if (!is_null($params)) {
                echo "[" . var_export($params, true) . "]\n";
            }
            echo $separator;
        } else if (AJAX_SCRIPT) {
            $separator = "--------------------------------";
            error_log($separator);
            error_log($sql);
            if (!is_null($params)) {
                error_log("[" . var_export($params, true) . "]");
            }
            error_log($separator);
        } else {
            $separator = "<hr />\n";
            echo $separator;
            echo s($sql) . "\n";
            if (!is_null($params)) {
                echo "[" . s(var_export($params, true)) . "]\n";
            }
            echo $separator;
        }
    }
protected function print_debug ( $ sql , array $ params = null , $ obj = null ) { if ( ! $ this -> get_debug ( ) ) { return ; } if ( CLI_SCRIPT ) { $ separator = "--------------------------------\n" ; echo $ separator ; echo "{$sql}\n" ; if ( ! is_null ( $ params ) ) { echo "[" . var_export ( $ params , true ) . "]\n" ; } echo $ separator ; } else if ( AJAX_SCRIPT ) { $ separator = "--------------------------------" ; error_log ( $ separator ) ; error_log ( $ sql ) ; if ( ! is_null ( $ params ) ) { error_log ( "[" . var_export ( $ params , true ) . "]" ) ; } error_log ( $ separator ) ; } else { $ separator = "<hr />\n" ; echo $ separator ; echo s ( $ sql ) . "\n" ; if ( ! is_null ( $ params ) ) { echo "[" . s ( var_export ( $ params , true ) ) . "]\n" ; } echo $ separator ; } }
Prints sql debug info
@param string $sql The query which is being debugged.
@param array $params The query parameters. (optional)
@param mixed $obj The library specific object. (optional)
@return void
Prints sql debug info