better fix

This commit is contained in:
Marc Delisle
2002-08-09 13:01:24 +00:00
parent d4ad527766
commit 58bb4d5c78
2 changed files with 6 additions and 5 deletions

View File

@@ -997,11 +997,11 @@ if (PMA_mysql_error()) {
//$result = @PMA_mysql_query('SELECT COUNT(Password) FROM mysql.user');
//$password_field = (($result && PMA_mysql_result($result, 0)) ? 'Password' : 'password');
$result = @PMA_mysql_query('Select * from user limit 1');
// using a syntax that works with older and recent MySQL,
// and assumes that the field name ends with "assword":
$result = @PMA_mysql_query('SHOW FIELDS FROM user FROM mysql LIKE \'%assword\'');
if ($result) {
// assumes that the password is always the third field of mysql.user
$field_info = PMA_mysql_fetch_field($result,2);
$password_field = $field_info->name;
$password_field = PMA_mysql_result($result, 0);
}
/**