do not use "mysql_result" on a query that failed

This commit is contained in:
Loïc Chapeaux
2002-05-04 07:18:15 +00:00
parent 535d565ed0
commit 649d5c317b
2 changed files with 5 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-05-04 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* user_details.php3, line 984: do not use "mysql_result" if the query
fails.
2002-05-03 Lo<4C>c Chapeaux <lolo@phpheaven.net> 2002-05-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* lang/italian.inc.php3: updated, thanks to Pietro Danesi. * lang/italian.inc.php3: updated, thanks to Pietro Danesi.
* tbl_properties.php3; tbl_properties_export.php3; * tbl_properties.php3; tbl_properties_export.php3;

View File

@@ -981,7 +981,7 @@ if (mysql_error()) {
exit(); exit();
} }
$result = @mysql_query('SELECT COUNT(Password) FROM mysql.user'); $result = @mysql_query('SELECT COUNT(Password) FROM mysql.user');
$password_field = (mysql_result($result, 0) ? 'Password' : 'password'); $password_field = ((!$result || mysql_result($result, 0)) ? 'Password' : 'password');
/** /**