Menu
Hi, i am gettin this mysql error with this code, does any 1 know why
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ”” at line 1
[code=php]
$num = 0;
$show = “SHOW TABLES”;
$show_res = mysql_query($show,$conn) or die(mysql_error());
while($row = mysql_fetch_assoc($show_res)) {
$sql = “DROP TABLE ‘”.$row[$num].”‘”;
mysql_query($sql) or die(mysql_error());
$num++;
}
It should list all the tables and then drop them all