]> git.joonet.de Git - adminer.git/commitdiff
Avoid warning
authorJakub Vrana <jakub@vrana.cz>
Tue, 1 Feb 2011 15:26:21 +0000 (16:26 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 1 Feb 2011 15:26:21 +0000 (16:26 +0100)
adminer/drivers/mysql.inc.php
adminer/drivers/pgsql.inc.php

index a7edc44a9635c076058a9b47dc0a5877dfb99b0e..c8f6e994a2644c822beadd611771b16fb7caec6f 100644 (file)
@@ -150,7 +150,7 @@ if (!defined("DRIVER")) {
                        */
                        function result($query, $field = 0) {
                                $result = $this->query($query);
-                               if (!$result) {
+                               if (!$result || !$result->num_rows) {
                                        return false;
                                }
                                return mysql_result($result->_result, 0, $field);
index b9c2148dcf61d7afc994d76e89cc689e1d099af3..c9fe0e03e3232943dc48567211d2589dc37dba78 100644 (file)
@@ -80,7 +80,7 @@ if (isset($_GET["pgsql"])) {
                        
                        function result($query, $field = 0) {
                                $result = $this->query($query);
-                               if (!$result) {
+                               if (!$result || !$result->num_rows) {
                                        return false;
                                }
                                return pg_fetch_result($result->_result, 0, $field);