PMA\libraries\plugins\export\ExportSql::generateComment PHP Метод

generateComment() защищенный Метод

Generate comment
protected generateComment ( string $crlf, string $sql_statement, string $comment1, string $comment2, string $table_alias, string $compat ) : string
$crlf string Carriage return character
$sql_statement string SQL statement
$comment1 string Comment for dumped table
$comment2 string Comment for current table
$table_alias string Table alias
$compat string Compatibility mode
Результат string
    protected function generateComment($crlf, $sql_statement, $comment1, $comment2, $table_alias, $compat)
    {
        if (!isset($sql_statement)) {
            if (isset($GLOBALS['no_constraints_comments'])) {
                $sql_statement = '';
            } else {
                $sql_statement = $crlf . $this->_exportComment() . $this->_exportComment($comment1) . $this->_exportComment();
            }
        }
        // comments for current table
        if (!isset($GLOBALS['no_constraints_comments'])) {
            $sql_statement .= $crlf . $this->_exportComment() . $this->_exportComment($comment2 . ' ' . Util::backquoteCompat($table_alias, $compat, isset($GLOBALS['sql_backquotes']))) . $this->_exportComment();
        }
        return $sql_statement;
    }