Remonte mieux l'erreur si l'utilisateur SQL existe pas

This commit is contained in:
Alan Garcia 2013-01-31 16:49:16 +00:00
parent 6b8965bc45
commit 4519fccd25
2 changed files with 9 additions and 5 deletions

View File

@ -41,7 +41,7 @@ getFields($fields);
<?php <?php
$r=$mysql->get_user_dblist($id); $r=$mysql->get_user_dblist($id);
if (!$r) { if (!$r) {
$error=_("This user doesn't exist"); $error=$err->errstr();
} }
if (! empty($error) ) { if (! empty($error) ) {

View File

@ -34,15 +34,19 @@ $fields = array (
"id" => array ("request", "string", ""), "id" => array ("request", "string", ""),
); );
getFields($fields); getFields($fields);
$r=$mysql->get_user_dblist($id);
?> ?>
<h3><?php printf(_("MySQL Rights for %s"),$id) ?></h3> <h3><?php printf(_("MySQL Rights for %s"),$id) ?></h3>
<hr id="topbar"/> <hr id="topbar"/>
<br /> <br />
<?php <?php
if (isset($error) && $error) { $r=$mysql->get_user_dblist($id);
echo "<p class=\"error\">$error</p><p>&nbsp;</p>"; if (!$r) {
$error=$err->errstr();
}
if (!empty($error)) {
echo "<p class=\"error\">$error</p><p>&nbsp;</p>";
require_once('foot.php');
} }
if ($r) { if ($r) {