List:MySQL on Win32« Previous MessageNext Message »
From:Paul DuBois Date:September 16 2002 3:16am
Subject:Re: Newbie problem creating table fields for database
View as plain text  
At 22:48 -0400 9/15/02, Marvin Cummings wrote:
>I'm very new to using mysql. In fact I'm trying to create my first 
>ever database & table that will be used to store info uploaded by 
>users to my site. I'm trying to create the table and fields for a 
>database I've created. It doesn't matter if I create it from the DOS 
>prompt or using phpmyadmin I get the same error:
>	ERROR 1064: You have an error in your sql syntax near ')' at line 16.
>
>This is the database, table, & fields that I'm trying to create:
>create database dbnubiint;
>use dbnubiint;
>mysql> create table nuwoez
>mysql> (
>mysql> id int auto_increment not null,
>mysql> Author varchar(40),
>mysql> City varchar(40),
>mysql> State char(2),
>mysql> Email varchar(20),
>mysql> Title varchar(40),
>mysql> CopyrightDate date,
>mysql> SubmitDate date,
>mysql> Category varchar(40),
>mysql> Filename varchar(40),
>mysql> FileDate mediumblob,
>mysql> FileType varchar(20),
>);
>
>After clicking enter to create the table, I get the error: ERROR 
>1064: You have an error in your sql syntax near ')' at line 16.
>
>Here's a link to the submit form: www.nubiint.com/nuwoez/nuwoez.htm
>
>Can someone shed some light on what it is I'm doing wrong? Am I 
>missing some fields?

No, you have a comma after the definition of your last column.
(Before the final closing paren.)  Delete it.

>Any help is appreciated...

Thread
Newbie problem creating table fields for databaseMarvin Cummings16 Sep
Re: Newbie problem creating table fields for databasePaul DuBois16 Sep