$mysql->result takes always first row

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@116 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2007-07-11 08:24:03 +00:00
parent d433043ff7
commit c8f50f9ad4
8 changed files with 12 additions and 13 deletions

View File

@@ -37,7 +37,7 @@ if ($_POST) {
$name = $_GET["db"];
$collate = array();
if (strlen($_GET["db"]) && ($result = $mysql->query("SHOW CREATE DATABASE " . idf_escape($_GET["db"])))) {
if (preg_match('~ COLLATE ([^ ]+)~', $mysql->result($result, 0, 1), $match)) {
if (preg_match('~ COLLATE ([^ ]+)~', $mysql->result($result, 1), $match)) {
$collate = $match[1];
}
$result->free();