I don't believe you specify a size for a column of type TEXT.  Only types
CHAR and VARCHAR take a size.
http://www.mysql.com/doc/B/L/BLOB.html says:
"A BLOB is a binary large object that can hold a variable amount of data.
The four BLOB types TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB differ only in
the
maximum length of the values they can hold. See section 6.2.6 Column Type
Storage Requirements. 

The four TEXT types TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT correspond to
the four BLOB types and have the same maximum lengths and storage
requirements."

Whereas, http://www.mysql.com/doc/C/H/CHAR.html says:
"The length of a CHAR column is fixed to the length that you declare when
you create the table. The length can be any value between 1 and 255."
and...
"Values in VARCHAR columns are variable-length strings. You can declare a
VARCHAR column to be any length between 1 and 255, just as for CHAR
columns."

Duncan
--
Duncan Salada | Titan | www.titan.com/testeval
Email: [EMAIL PROTECTED] | Voice: 301-925-3222x375 | Fax: 301-925-3216

> -----Original Message-----
> From: MadProfessor [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 7:51 AM
> To: [EMAIL PROTECTED]
> Subject: Getting a text field in a table....
> 
> 
> Stupid newbie question, but why in the hell can't I get this 
> damned TEXT
> column added? I've specified it as size 254 and cannot get it to
> work.... Someone please give me an example of a working create table
> statement with a TEXT or LONGTEXT column? I've read through my book
> (MySQL) and checked the documentation, but no working 
> examples, just the
> standard stuff......
> Cheers,
> MadProfessor ZERO
> 
> 
> ---------------------------------------------------------------------
> 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

Reply via email to