bug #1179969, MySQLi and privileges

This commit is contained in:
Marc Delisle
2005-04-10 12:28:59 +00:00
parent 7f82ccc533
commit 38c65094db
2 changed files with 8 additions and 5 deletions

View File

@@ -604,8 +604,8 @@ if (!empty($adduser_submit) || !empty($change_copy)) {
unset($row);
break;
}
$res = PMA_DBI_query('SELECT \'foo\' FROM `user` WHERE ' . PMA_convert_using('User') . ' = ' . PMA_convert_using(PMA_sqlAddslashes($username), 'quoted') . ' AND ' . PMA_convert_using('Host') . ' = ' . PMA_convert_using($hostname, 'quoted') . ';');
if (PMA_DBI_affected_rows() == 1) {
$res = PMA_DBI_query('SELECT \'foo\' FROM `user` WHERE ' . PMA_convert_using('User') . ' = ' . PMA_convert_using(PMA_sqlAddslashes($username), 'quoted') . ' AND ' . PMA_convert_using('Host') . ' = ' . PMA_convert_using($hostname, 'quoted') . ';', NULL, PMA_DBI_QUERY_STORE);
if (PMA_DBI_num_rows($res) == 1) {
PMA_DBI_free_result($res);
$message = sprintf($strUserAlreadyExists, '[i]\'' . $username . '\'@\'' . $hostname . '\'[/i]');
$adduser = 1;
@@ -1152,8 +1152,8 @@ if (empty($adduser) && empty($checkprivs)) {
}
}
echo '</h2>' . "\n";
$res = PMA_DBI_query('SELECT \'foo\' FROM `user` WHERE ' . PMA_convert_using('User') . ' = ' . PMA_convert_using(PMA_sqlAddslashes($username), 'quoted') . ' AND ' . PMA_convert_using('Host') . ' = ' . PMA_convert_using($hostname, 'quoted') . ';');
if (PMA_DBI_affected_rows($userlink) < 1) {
$res = PMA_DBI_query('SELECT \'foo\' FROM `user` WHERE ' . PMA_convert_using('User') . ' = ' . PMA_convert_using(PMA_sqlAddslashes($username), 'quoted') . ' AND ' . PMA_convert_using('Host') . ' = ' . PMA_convert_using($hostname, 'quoted') . ';', NULL, PMA_DBI_QUERY_STORE);
if (PMA_DBI_num_rows($res) < 1) {
echo $strUserNotFound;
require_once('./footer.inc.php');
}