The following big chunk of code produces the following line:
uukjh has been deletedMySql has been selectedDELETE FROM db WHERE Db =
uukjhUser Db has failed
Which tells me that everything but the delete command does not work.
The above line is broken down to database name has been deleted, The
selecting of the database worked, my sql command looks good (I think) and
that the delete command failed. When I log in the MySql through the
command promt, the record is still there. I have compared the command that
I type into delete the record to the one that the computer products and
there is no differenct.
Please help
John
$link = @mysql_connect("","$PHP_AUTH_USER","$PHP_AUTH_PW")
or die ("$PHP_AUTH_USER is not authorized to delete the database");
$result = mysql_drop_db($db_name,$link);
if ($result) {
echo "$db_name has been deleted";
} else {
printf("Unable to delete $db_name\n");
echo mysql_error($link);
}
$link = @mysql_connect("","youknowwho","nonofyourbusiness")
or die("Unable to connect to update db table" );
$selected = @mysql_select_db("mysql",$link);
if ($selected) {
echo "MySql has been selected";
} else {
echo "Can't select MySql";
exit;
}
$sql = "DELETE FROM db WHERE Db = $db_name";
echo $sql;
$result = @mysql_query("$sql","$link");
// or die("Could not update User Db");
echo mysql_error($link);
echo $result;
if ($result) {
echo "User Db is updated";
} else {
echo "User Db has failed";
}