Hi,
check you've got a D/B connection, then use this, with the appropriate names
in the variables, or use the explicit table names if you wish. If an error
spews up, most likely the table name your trying to rename it to already
exists.
$sql = "RENAME TABLE $present_table_name TO $new_table_name
";
$result = @mysql_query($sql,$connection) or die("New table name already
exists");
Regards
Kevin Williams
----- Original Message -----
From: "Augusto Cesar Castoldi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 26, 2001 10:18 PM
Subject: [PHP] alter table name with php and mysql
> How can I alter a table name in mysql with php?
>
> thanks,
>
> Augusto cesar Castoldi
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]