Mysql/Create table
Posted: Sat Dec 14, 2002 9:50 am
I am new to Mysql and I am using phpMyAdmin. I have been trying to build an e-commerce site that I downloaded from DevShed.com and everything has went fine until I got towards the end. I keep getting a syntax error at the end of the following block of code; Index username (username). I have tried everything and have not been able to get Mysql to except it.
Any help will be greatly appreciated the block of code is as follows:
CREATE TABLE orders (
id int not null auto_increment,
username varchar(16) not null,
o_timestamp datetime,
a_timestamp datetime,
status tinyint,
status_details varchar(255),
custinfo text,
comments text,
amount float(5,2),
PRIMARY KEY (id)
INDEX username (username)
)

Any help will be greatly appreciated the block of code is as follows:
CREATE TABLE orders (
id int not null auto_increment,
username varchar(16) not null,
o_timestamp datetime,
a_timestamp datetime,
status tinyint,
status_details varchar(255),
custinfo text,
comments text,
amount float(5,2),
PRIMARY KEY (id)
INDEX username (username)
)