From e0842e29d23a0ce65940a901218ceeeb22d4d42c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 15 Jun 2001 13:06:59 +0000 Subject: [PATCH] bug 433388 --- ChangeLog | 3 +++ sql.php3 | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2edefe42e..a7c12acc8 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-06-15 Marc Delisle + * bug 433388, patch from Alain Brissaud (hal0802) + 2001-06-14 Steve Alberty * add support for locked tables (default=off) * add summary on db_details.php3 diff --git a/sql.php3 b/sql.php3 index 777afda72..8e43e9430 100755 --- a/sql.php3 +++ b/sql.php3 @@ -74,7 +74,9 @@ else { $array=split(' from | FROM ',$sql_query,2); //read only the from-part of the query $count_query="select count(*) as count from $array[1]"; //and make a count(*) to count the entries $OPresult = mysql_query($count_query); - $SelectNumRows = mysql_result($OPresult,'0','count'); + if ($OPresult) { + $SelectNumRows = mysql_result($OPresult,'0','count'); + } } if(!$result)