Re: what's wrong with this?????

From: Date: Tue, 08 Jul 2003 15:31:33 +0000
Subject: Re: what's wrong with this?????
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154384@lists.php.net to get a copy of this message
Umm quotes. Anywhere in your actual SQL that you are using a single quote, you need to put a backslash before it, example: activated ENUM('0','1') DEFAULT '0' Becomes: activated ENUM(\'0\',\'1\') DEFAULT \'0\' On Tue, 2003-07-08 at 11:26, Artoo wrote: > I keep getting Parse error: parse error, unexpected T_LNUMBER in > /usr/local/psa/home/create.php on line 9 > > This is line 9, which should just create a table. > > $result = mysql_query('CREATE TABLE members (userid INT(25) NOT NULL > AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(50) NOT > NULL, email_address VARCHAR(255) NOT NULL, username VARCHAR(30) NOT NULL, > password VARCHAR(30) NOT NULL, activated ENUM('0','1') DEFAULT > '0' NOT NULL, > date_joined DATETIME NULL, last_login DATETIME NULL);')or die("Create table > Error: ".mysql_error()); > > What's that error mean and is that CREATE TABLE query correct? > > Thanks -- Adam Voigt (adam@cryptocomm.com) Linux/Unix Network Administrator The Cryptocomm Group

« previous php.general (#154384) next »