Hi there,
I am wanting to drop some tables have the script do it automatically its showing a blank page this is my php script i have atm
$sql = "SHOW Tables FROM $dbname";
$result = mysqli_query($con,$sql);
if (!$result)
{
echo "DB Error, could not list tables\
";
echo 'MySQL Error: ' . mysqli_error($con);
exit;
}
while ($row = mysqli_fetch_row($result))
{
$d=$row[0];
echo $d;
//
$r="DROP TABLE {$row[0]}";
echo $r;
$rs=mysqli_query($con,$r);
if(!$rs)
{
echo "Error".mysqli_error($con);
}
else
{
echo "Database $row has been emptied";
}
//
//echo "\
";
}
mysqli_free_result($result);
What am i doing wrong??