alter table statement from within php web page

From: Date: Wed, 02 Oct 2002 05:01:20 +0000
Subject: alter table statement from within php web page
Groups: php.db 
Request: Send a blank email to php-db+get-22146@lists.php.net to get a copy of this message
I would like to know how to add columns to an existing table. I've tried this - $qry = mysql_query("alter table exercises add column $fieldname char($length) not null") or die(sql_error()); but it doesn't work, I get this error - 1064: You have an error in your SQL syntax near 'lifts, char(25), not null' at line 1 I don't see any reference to this in the php manual or in the two php/mysql books that I have. Anybody know how to do this? -- Chip

« previous php.db (#22146) next »