RE: [PHP-DB] CREATE TABLE problem

From: Date: Thu, 22 Jan 2004 15:16:29 +0000
Subject: RE: [PHP-DB] CREATE TABLE problem
Groups: php.db 
Request: Send a blank email to php-db+get-32584@lists.php.net to get a copy of this message
Regarding... -- $query = "CREATE TABLE staff ( -- staffid INT(3) NOT NULL AUTO_INCREMENT UNSIGNED, -- name VARCHAR(255) NOT NULL, -- login VARCHAR(10) NOT NULL, -- password VARCHAR(8) NOT NULL, -- picaddy VARCHAR(255) NOT NULL, -- email VARCHAR(255) NOT NULL, -- staffbio TEXT NOT NULL, -- createdate DATE NOT NULL, -- tagline VARCHAR(255) NOT NULL, -- PRIMARY KEY(staffid,login) )"; The problem with the above create table query is the _placement_ of the UNSIGNED keyword. Rather than: << staffid INT(3) NOT NULL AUTO_INCREMENT UNSIGNED, >> try: << staffid INT(3) UNSIGNED NOT NULL AUTO_INCREMENT, >> The second worked for me while the first threw the previously reported SQL Syntax error. HTH, David

« previous php.db (#32584) next »