Alter Table newbie help needed ...

From: Date: Sat, 19 Apr 2008 21:23:57 +0000
Subject: Alter Table newbie help needed ...
Groups: php.general 
Request: Send a blank email to php-general+get-273306@lists.php.net to get a copy of this message
Newbie - MAC - MAMP on port 8889 I have this connection to Mysql database called 'test' Other Php stuff works ok but now I'm trying to alter the table (never did that before...) Connection called 'try1'... <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_try1 = "127.0.0.1:8889"; $database_try1 = "test"; $username_try1 = "test"; $password_try1 = "test"; $try1 = mysql_pconnect($hostname_try1, $username_try1, $password_try1) or trigger_error(mysql_error(),E_USER_ERROR); ?> The lines below don't error but also don't do anything.... I must be missing something here.... Right? Maybe it doesn't know to use try1 connection? How do I add that? <?php $sql = 'ALTER TABLE ztest ADD myfield2 VARCHAR(10) NOT NULL;'; ---or--- $sql = 'ALTER TABLE ztest RENAME TO ztest2;'; ?> -- Thanks - RevDave Cool @ hosting4days . com [db-lists]

« previous php.general (#273306) next »