I'm trying to rename a table in a Mysql db, from PHP, but this code doesn't work:
$sql = "RENAME TABLE dbname.table TO dbname.tabletmp;";
$conn->query($sql);
I've tried to use also ALTER TABLE
or the ''
for the table names, but nothing. Any ideas?
It seems that in PHP ALTER TABLE
isn't a command :/