Re: what's wrong with this?????
| From: | Artoo | Date: | Tue, 08 Jul 2003 15:34:54 +0000 |
| Subject: | Re: what's wrong with this????? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154385@lists.php.net to get a copy of this message | ||
Thanks.
----- Original Message -----
From: "Adam Voigt" <adam@cryptocomm.com>
To: "Artoo" <artoo_s@hotmail.com>
Cc: <php-general@lists.php.net>
Sent: Tuesday, July 08, 2003 11:31 AM
Subject: Re: [PHP] what's wrong with this?????
> 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
>
>