RE: CREATE TABLE problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux