RE: Newbie stumped by table error

2001-06-13 Thread massey


Go through http://www.mysql.com/documentation/mysql/bychapter/manual_Tutorial.html
This is a good starting point.
Look this over and you will see your error  ;

Use a CREATE TABLE statement to specify the layout of your table: 

mysql CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),
- species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);



-Original Message-
FROM: Jeff Caron
TO: [EMAIL PROTECTED]
DATE: Wed 6/13/01 10:15
SUBJECT: Newbie stumped by table error

Hello-

I'm just beginning to teach myself MySQL with the help of Michael Widenius'
book MySQL. I've entered the create table statement exactly as shown in
the book (pg. 28 if you have the book) and I get an error message every
time. This is very frustrating as I can't go any further with the tutorial
without creating all the tables first. Could someone on this list please
help me so I can correctly create this table?

Incidentally, I checked the corrections document on the book publisher's web
site and there were no corrections for this page. This makes me even more
stumped...

Here's the statement I submitted:

CREATE TABLE member
(
last_name VARCHAR(20) NOT NULL,
last_name VARCHAR(20) NOT NULL,
suffix VARCHAR(5) NULL,
expiration DATE NULL DEFAULT -00-00,
email VARCHAR(100) NULL,
street VARCHAR(50) NULL,
city VARCHAR(50) NULL,
state VARCHAR(2) NULL,
zip VARCHAR(10) NULL,
phone VARCHAR(20) NULL,
interests VARCHAR(255) NULL
)

Here's the error message I keep getting:

ERROR 1064 at line 1: You have an error in your SQL syntax near '-00-00,
email VARCHAR(100) NULL,
street VARCHAR(50) NULL,
city VARCHAR(50) NULL,' at line 6


Any help would be most appreciated.

Jeff Caron







-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Newbie stumped by table error

2001-06-13 Thread Barry C. Hawkins

on 6/13/01 10:58, Jeff Caron at [EMAIL PROTECTED] wrote:

 Hello-
 
 I'm just beginning to teach myself MySQL with the help of Michael Widenius'
 book MySQL. I've entered the create table statement exactly as shown in
 the book (pg. 28 if you have the book) and I get an error message every
 time. This is very frustrating as I can't go any further with the tutorial
 without creating all the tables first. Could someone on this list please
 help me so I can correctly create this table?
 
 Incidentally, I checked the corrections document on the book publisher's web
 site and there were no corrections for this page. This makes me even more
 stumped...
 
 Here's the statement I submitted:
 
 CREATE TABLE member
 (
 last_name VARCHAR(20) NOT NULL,
 last_name VARCHAR(20) NOT NULL,
 suffix VARCHAR(5) NULL,
 expiration DATE NULL DEFAULT -00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,
 state VARCHAR(2) NULL,
 zip VARCHAR(10) NULL,
 phone VARCHAR(20) NULL,
 interests VARCHAR(255) NULL
 )
 
 Here's the error message I keep getting:
 
 ERROR 1064 at line 1: You have an error in your SQL syntax near '-00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,' at line 6
 
 
 Any help would be most appreciated.
 
 Jeff Caron
 
 
 
 
 
 
 
 -
 Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
Did you try leaving out the dashes?  Also, I am sure you are putting a
semicolon after the closing bracket of the CREATE TABLE statement, right?

Hope this helps,
-- 
Barry C. Hawkins
Systems Consultant, MCSE 4.0
[EMAIL PROTECTED]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Newbie stumped by table error

2001-06-13 Thread Tim


Also, I don' think -00-00 is a valid Date.  You might want to use
something else as a default.

- TIM

 Hello-

 I'm just beginning to teach myself MySQL with the help of Michael Widenius'
 book MySQL. I've entered the create table statement exactly as shown in
 the book (pg. 28 if you have the book) and I get an error message every
 time. This is very frustrating as I can't go any further with the tutorial
 without creating all the tables first. Could someone on this list please
 help me so I can correctly create this table?

 Incidentally, I checked the corrections document on the book publisher's web
 site and there were no corrections for this page. This makes me even more
 stumped...

 Here's the statement I submitted:

 CREATE TABLE member
 (
 last_name VARCHAR(20) NOT NULL,
 last_name VARCHAR(20) NOT NULL,
 suffix VARCHAR(5) NULL,
 expiration DATE NULL DEFAULT -00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,
 state VARCHAR(2) NULL,
 zip VARCHAR(10) NULL,
 phone VARCHAR(20) NULL,
 interests VARCHAR(255) NULL
 )

 Here's the error message I keep getting:

 ERROR 1064 at line 1: You have an error in your SQL syntax near '-00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,' at line 6


 Any help would be most appreciated.

 Jeff Caron







 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
-TIM


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Newbie stumped by table error

2001-06-13 Thread Tim


Did you try taking out one of the 'last_name' field definitions??  It
looks like you have two there...

- TIM

 Hello-

 I'm just beginning to teach myself MySQL with the help of Michael Widenius'
 book MySQL. I've entered the create table statement exactly as shown in
 the book (pg. 28 if you have the book) and I get an error message every
 time. This is very frustrating as I can't go any further with the tutorial
 without creating all the tables first. Could someone on this list please
 help me so I can correctly create this table?

 Incidentally, I checked the corrections document on the book publisher's web
 site and there were no corrections for this page. This makes me even more
 stumped...

 Here's the statement I submitted:

 CREATE TABLE member
 (
 last_name VARCHAR(20) NOT NULL,
 last_name VARCHAR(20) NOT NULL,
 suffix VARCHAR(5) NULL,
 expiration DATE NULL DEFAULT -00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,
 state VARCHAR(2) NULL,
 zip VARCHAR(10) NULL,
 phone VARCHAR(20) NULL,
 interests VARCHAR(255) NULL
 )

 Here's the error message I keep getting:

 ERROR 1064 at line 1: You have an error in your SQL syntax near '-00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,' at line 6


 Any help would be most appreciated.

 Jeff Caron







 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
-TIM


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Newbie stumped by table error

2001-06-13 Thread Jeff Caron

Tim,

I noticed that too. I only repeated it when I typed it into the email
message though, not my MySQL monitor.

Thanks,

Jeff

 From: Tim [EMAIL PROTECTED]
 Date: Wed, 13 Jun 2001 12:19:29 -0400 (EDT)
 To: Jeff Caron [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Newbie stumped by table error
 
 
 Did you try taking out one of the 'last_name' field definitions??  It
 looks like you have two there...
 
 - TIM
 
 Hello-
 
 I'm just beginning to teach myself MySQL with the help of Michael Widenius'
 book MySQL. I've entered the create table statement exactly as shown in
 the book (pg. 28 if you have the book) and I get an error message every
 time. This is very frustrating as I can't go any further with the tutorial
 without creating all the tables first. Could someone on this list please
 help me so I can correctly create this table?
 
 Incidentally, I checked the corrections document on the book publisher's web
 site and there were no corrections for this page. This makes me even more
 stumped...
 
 Here's the statement I submitted:
 
 CREATE TABLE member
 (
 last_name VARCHAR(20) NOT NULL,
 last_name VARCHAR(20) NOT NULL,
 suffix VARCHAR(5) NULL,
 expiration DATE NULL DEFAULT -00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,
 state VARCHAR(2) NULL,
 zip VARCHAR(10) NULL,
 phone VARCHAR(20) NULL,
 interests VARCHAR(255) NULL
 )
 
 Here's the error message I keep getting:
 
 ERROR 1064 at line 1: You have an error in your SQL syntax near '-00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,' at line 6
 
 
 Any help would be most appreciated.
 
 Jeff Caron
 
 
 
 
 
 
 
 -
 Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 -- 
 -TIM
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Newbie stumped by table error

2001-06-13 Thread Jeff Caron

Tim,

I took out the dashes as another person suggested and that made it work. I
typed in -00-00 because that is what it says to enter in my MySQL book
(by Michael Widenius).

Thanks,

Jeff


 From: Tim [EMAIL PROTECTED]
 Date: Wed, 13 Jun 2001 12:20:49 -0400 (EDT)
 To: Jeff Caron [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Newbie stumped by table error
 
 
 Also, I don' think -00-00 is a valid Date.  You might want to use
 something else as a default.
 
 - TIM
 
 Hello-
 
 I'm just beginning to teach myself MySQL with the help of Michael Widenius'
 book MySQL. I've entered the create table statement exactly as shown in
 the book (pg. 28 if you have the book) and I get an error message every
 time. This is very frustrating as I can't go any further with the tutorial
 without creating all the tables first. Could someone on this list please
 help me so I can correctly create this table?
 
 Incidentally, I checked the corrections document on the book publisher's web
 site and there were no corrections for this page. This makes me even more
 stumped...
 
 Here's the statement I submitted:
 
 CREATE TABLE member
 (
 last_name VARCHAR(20) NOT NULL,
 last_name VARCHAR(20) NOT NULL,
 suffix VARCHAR(5) NULL,
 expiration DATE NULL DEFAULT -00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,
 state VARCHAR(2) NULL,
 zip VARCHAR(10) NULL,
 phone VARCHAR(20) NULL,
 interests VARCHAR(255) NULL
 )
 
 Here's the error message I keep getting:
 
 ERROR 1064 at line 1: You have an error in your SQL syntax near '-00-00,
 email VARCHAR(100) NULL,
 street VARCHAR(50) NULL,
 city VARCHAR(50) NULL,' at line 6
 
 
 Any help would be most appreciated.
 
 Jeff Caron
 
 
 
 
 
 
 
 -
 Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 -- 
 -TIM
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Newbie stumped by table error

2001-06-13 Thread Paul DuBois

You'll see exactly that error if you type the default date -00-00
*without* the quotes.  If you included the quotes, then something is
quite odd indeed.  This is such a basic statement in the book that
you can be sure any error would have been reported by now.

What version of MySQL are you using, and on what platform?

Hello-

I'm just beginning to teach myself MySQL with the help of Michael Widenius'
book MySQL. I've entered the create table statement exactly as shown in
the book (pg. 28 if you have the book) and I get an error message every
time. This is very frustrating as I can't go any further with the tutorial
without creating all the tables first. Could someone on this list please
help me so I can correctly create this table?

Incidentally, I checked the corrections document on the book publisher's web
site and there were no corrections for this page. This makes me even more
stumped...

Here's the statement I submitted:

CREATE TABLE member
(
last_name VARCHAR(20) NOT NULL,
last_name VARCHAR(20) NOT NULL,
suffix VARCHAR(5) NULL,
expiration DATE NULL DEFAULT -00-00,
email VARCHAR(100) NULL,
street VARCHAR(50) NULL,
city VARCHAR(50) NULL,
state VARCHAR(2) NULL,
zip VARCHAR(10) NULL,
phone VARCHAR(20) NULL,
interests VARCHAR(255) NULL
)

Here's the error message I keep getting:

ERROR 1064 at line 1: You have an error in your SQL syntax near '-00-00,
email VARCHAR(100) NULL,
street VARCHAR(50) NULL,
city VARCHAR(50) NULL,' at line 6


Any help would be most appreciated.

Jeff Caron

-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php