]> git.joonet.de Git - adminer.git/commitdiff
Routines uses CHARACTER SET
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 17 Jul 2007 05:51:09 +0000 (05:51 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 17 Jul 2007 05:51:09 +0000 (05:51 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@202 7c3ca157-0c34-0410-bff1-cbf682f78f5c

editing.inc.php

index a733baab736bc257d4136d4c5d3ed56fe56c507a..961d9ebb9d5ce17b3ede134d388985f3b449ce19 100644 (file)
@@ -68,12 +68,12 @@ function edit_type($key, $field, $collations) {
 <?php
 }
 
-function process_type($field) {
+function process_type($field, $collate = "COLLATE") {
        global $mysql, $enum_length, $unsigned;
        return " $field[type]"
                . ($field["length"] ? "(" . (preg_match("~^\\s*(?:$enum_length)(?:\\s*,\\s*(?:$enum_length))*\\s*\$~", $field["length"]) && preg_match_all("~$enum_length~", $field["length"], $matches) ? implode(",", $matches[0]) : intval($field["length"])) . ")" : "")
                . (preg_match('~int|float|double|decimal~', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
-               . (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " COLLATE '" . $mysql->escape_string($field["collation"]) . "'" : "")
+               . (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " $collate '" . $mysql->escape_string($field["collation"]) . "'" : "")
        ;
 }