Yes, you're quite right. Mea culpa...
-Original Message-
From: Sean Finkel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 7:56 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] add a column to a table via PHP
Wouldn't you also need the datatype of the new column (i
AIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 7:36 PM
Subject: RE: [PHP-DB] add a column to a table via PHP
The following assumes you've already selected the database and that $column
contains the name of the new column and $defaultvalue is the value to be
se
: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] add a column to a table via PHP
The following assumes you've already selected the database and that $column
contains the name of the new column and $defaultvalue is the value to be
set.
$query = "ALTER TABLE Prices ADD $column DEFAULT \&quo
The following assumes you've already selected the database and that $column contains
the name of the new column and $defaultvalue is the value to be set.
$query = "ALTER TABLE Prices ADD $column DEFAULT \"$defaultvalue\"";
mysql_query($query) or die("Can't add column to Prices");
$query = "UPDA