List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 24 2001 3:54am
Subject:Re: Cannot create text fields
View as plain text  
At 1:31 PM +1000 7/24/01, Geoff Martin wrote:
>Using the following Syntax I tried to create a table in mySQL. However each
>time it returned a mySQL error which I eventually worked out it was because
>I'd defined a field as text. I am able to define fields as varchar, char,
>int or float (I've tested for theses so far) but not text or blob.
>The query was
>CREATE TABLE products(prod_id int(4),prod_name text(30),prod_detail
>varchar(255),prod_price float(6))
>which returns the error there is an error in the syntax near
>(30),prod_detail varchar(255),prod_price float(6)
>I am running on Mac OS X with MySQL 3.23.39
>Any of you kind people got an idea why?

TEXT doesn't take a length in MySQL.  Maybe VARCHAR(30) would do for

>Geoff M

Paul DuBois, paul@stripped
Cannot create text fieldsGeoff Martin24 Jul
  • Re: Cannot create text fieldsPaul DuBois24 Jul
  • Re: Cannot create text fieldsCal Evans26 Jul