i want a field that could hold many, many, many lines of text.
data type?
thanks,
Sam
| SitePoint Sponsor |



i want a field that could hold many, many, many lines of text.
data type?
thanks,
Sam





longtext or longblob
Please don't PM me with questions.
Use the forums, that is what they are here for.



thanks!!!
what's the max?





This is from MySQL docs:
LONGBLOB
LONGTEXT
A BLOB or TEXT column with a maximum length of 4294967295 (2^32 - 1) characters.
- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy



why am I getting this error?
Error
MySQL said: You have an error in your SQL syntax near '(1000) not null ' at line 1
Back





Got it from phpMyAdmin, correct(looks so similar!)
Post the query here and let us analyze!![]()
- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy



Field ==> status_report
Type ==> LONGTEXT
Length/Set ==> 1000
Attributes ==>
Null ==> not null
Default ==>
Extra ==>




Why not just use a 'text' field?



can it be 1000 long?



so what am I doing wrong?



so nobody knows?
When you set it up do not set a length... Do not worry about it.
ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC



what's the max? and what's the next highest?
Sam





Go check out column types in the documantation at http://www.mysql.com
Please don't PM me with questions.
Use the forums, that is what they are here for.



i've tried looking at the documentation, but I can't find a clear answer.
just need the longest data type and it's max.
anyone who's experience with mysql should know this answer, it's simple.
sam
Just use longtext and do not put a value for it.
Restrict the number of characters on the client side....
BTW, this is the quickest and easiest solution.![]()
ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC





From the mysql manual(took me 10 sec. to find it)LONGTEXT
A BLOB or TEXT column with a maximum length of 4294967295 (2^32 - 1) characters. See section 7.7.1 Silent Column Specification Changes. Note that because the server/client protocol and MyISAM tables has currently a limit of 16M per communication packet / table row, you can't yet use this the whole range of this type.
LONGTEXT holds 4294967295 characters. you don't put a length on this type of field when defining it
IE
CREATE table test (
id INT(11) NOT NULL PRIMARY KEY,
text LONGTEXT
);
Please don't PM me with questions.
Use the forums, that is what they are here for.



very cool. what's the max?
what would be the "other way?"
Thanks,
Sam



thanks! appears that the last time that i tried using the longtext i was entering some invalid characters.
see for yourselves... http://www.dlgsolutions.com/test2.php3
username: c
password: c
thanks!
Sam





Isn't blob for holding binary files...not text...?





I don't know much about blob, never have to use that data type before. So what do you use blob for?
- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy
Bookmarks