RE: [PHP-DB] ALTER TABLE - code not working.

From: Date: Thu, 29 Mar 2001 16:31:39 +0000
Subject: RE: [PHP-DB] ALTER TABLE - code not working.
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7997@lists.php.net to get a copy of this message
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:jpstech@unoh.edu] Sent: 29 March 2001 16:54 To: Martin E. Koss Cc: Jason Stechschulte; php-db@lists.php.net 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 jpstech@unoh.edu -- 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: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#7997) next »