I just pasted:
ALTER TABLE vips ADD NewAD FLOAT (11,2) DEFAULT '0.00' NULL
into the 'Run SQL' box on phpMyAdmin and it did exactly what it should do. I
did it both online (hosting servers) and offline on my Win/Apache and both
are fine, new column added.

However, via the PHP script we're discussing it doesn't create the column or
generate an error. The username and password that phpMyAdmin uses is the
same as the one the connections for the web site uses and that includes full
privelidges.

Baffled - me too!

Martin

-----Original Message-----
From: Jason Stechschulte [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 16:54
To: Martin E. Koss
Cc: Jason Stechschulte; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] ALTER TABLE - code not working.


On Thu, Mar 29, 2001 at 03:53:07PM +0100, Martin E. Koss wrote:
> I did what you suggested and (exactly as it appears in the browser window)
> here is what is sent to the screen:
>
> ALTER TABLE vips ADD NewAD FLOAT (11,2) DEFAULT '0.00'
>
> The new item (sent from the previous form) is added to the database but
the
> new column is NOT added to the other table, but no error is displayed.

Ok, this is a new one for me.  I've never seen mysql_error() not return an
error *and* the sql statement not work.  You mentioned earlier that you
are able to do this using phpMyAdmin, is that on the same server that
you are running your php script from?  I am beginning to wonder if this
isn't a permissions problem.  Does the user you are using have the
correct privileges from the server your php script runs on?

--
Jason Stechschulte
[EMAIL PROTECTED]
--
break;                          /* don't do magic till later */
             -- Larry Wall in stab.c from the perl source code

--
PHP Database 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 Database 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]

Reply via email to