List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 29 2002 6:08am
Subject:Re: MySQL gurus - easy one.
View as plain text  
At 22:23 -0700 1/28/02, Colin Faber wrote:
>Correct,
>
>If you MUST use date as the column name escape it with forward ticks,
>`date`

Actually, according to the error message, neither one of you is correct. :-)

The message was:

ERROR 1064 at line 3: You have an error in your SQL syntax near 'from 
varchar(200),

Which indicates that "from" is the word that MySQL's complaining about.
FROM is a reserved word.  DATE is the name of the column type, but it
can be used as a column name as well.

Nevertheless, Colin's solution should work, except I think they're called
backticks. :-)  Use `from` rather than just from as the column name.
Better yet, pick another name so you don't have to mess with the backticks.

>
>"Mike(mickalo)Blezien" wrote:
>>
>>  On Tue, 29 Jan 2002 08:08:44 +0300, Odhiambo Washington
> <wash@stripped>
>>  wrote:
>>
>>  >>Please forgive my bad step of joining the list and begining with 
>>questions.
>>  >>I'm a NEWBIE at MySQL with very minimal knowledge. I'm beginning to
> learn
>>  >>(self-teaching).
>>  >>
>>  >>
>>  >>I am trying to create a table and made a file as below:
>>
>>  I believe the column name your using "date" is a reserved word in MySQL
>>
>>  Mike(mickalo)Blezien
>>  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>  Thunder Rain Internet Publishing
>>  Providing Internet Solutions that work!
>>  http://www.thunder-rain.com
>>  Tel: 1(225)686-2002
>  > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  >
>--
>Colin Faber
>(303) 859-1491
>fpsn.net, Inc.

Thread
MySQL gurus - easy one.Odhiambo Washington29 Jan
  • Re: MySQL gurus - easy one.Mike(mickalo)Blezien29 Jan
  • Re: MySQL gurus - easy one.Colin Faber29 Jan
    • Re: MySQL gurus - easy one.Paul DuBois29 Jan
  • Re: MySQL gurus - easy one.Sherwin Ang29 Jan