What I want is to rename a table from php. I have tried with this:
mysql_query("RENAME TABLE ". $tablaNom ." TO '.$nombre.'") or die(mysql_error());
The previous line renames me the table but it puts a "." in the name and when I want to make a select it tells me that the table does not exist.
Likewise I have tried using the following line:
mysql_query("RENAME TABLE ". $tablaNom ." TO '".$nombre."'") or die(mysql_error());
But it says the following: "Incorrect table name".
I hope you can help me, and thank you in advance.