Re: Alter Table newbie help needed ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/21/2008 2:04 PM, "revDAVE" <Cool@xxxxxxxxxxxxxxxx> wrote:

> : Is there a way to insure that it uses the right connection ( try1 - not
> connect2 )?



- seems to be ok now with this new db selector line...

mysql_select_db($database_try1, $try1); // this new line


New ...
<?php

$sql = 'ALTER TABLE `ztest` ADD `newfield3` VARCHAR(50) NOT NULL;';
mysql_select_db($database_try1, $try1);
$result = mysql_query($sql) or die("no good dB $sql" . mysql_error());

?>


Old - no

<?php

$sql = 'ALTER TABLE `ztest` ADD `newfield3` VARCHAR(50) NOT NULL;';

$result = mysql_query($sql) or die("no good dB $sql" . mysql_error());

?>

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux