Re: alter table name with php and mysql

From: Date: Thu, 26 Apr 2001 21:38:50 +0000
Subject: Re: alter table name with php and mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50510@lists.php.net to get a copy of this message
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" <castoldi@inf.ufsc.br> To: <php-general@lists.php.net> 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#50510) next »