SitePoint Sponsor |
|
User Tag List
Results 1 to 21 of 21
-
Dec 5, 2000, 12:20 #1
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i want a field that could hold many, many, many lines of text.
data type?
thanks,
Sam
-
Dec 5, 2000, 12:25 #2
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
longtext or longblob
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Dec 5, 2000, 12:49 #3
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks!!!
what's the max?
-
Dec 5, 2000, 13:02 #4
- Join Date
- Aug 2000
- Location
- Silicon Valley
- Posts
- 2,241
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Dec 5, 2000, 13:17 #5
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Dec 5, 2000, 13:21 #6
- Join Date
- Aug 2000
- Location
- Silicon Valley
- Posts
- 2,241
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Dec 5, 2000, 13:45 #7
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Field ==> status_report
Type ==> LONGTEXT
Length/Set ==> 1000
Attributes ==>
Null ==> not null
Default ==>
Extra ==>
-
Dec 5, 2000, 16:05 #8
- Join Date
- Jul 2000
- Posts
- 759
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why not just use a 'text' field?
-
Dec 5, 2000, 16:24 #9
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
can it be 1000 long?
-
Dec 6, 2000, 12:31 #10
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
so what am I doing wrong?
-
Dec 6, 2000, 15:49 #11
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
so nobody knows?
-
Dec 6, 2000, 15:56 #12
- Join Date
- Aug 2000
- Location
- Houston, TX, USA
- Posts
- 6,455
- Mentioned
- 11 Post(s)
- Tagged
- 0 Thread(s)
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
-
Dec 6, 2000, 16:15 #13
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
what's the max? and what's the next highest?
Sam
-
Dec 6, 2000, 16:16 #14
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
-
Dec 6, 2000, 16:34 #15
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Dec 6, 2000, 16:41 #16
- Join Date
- Aug 2000
- Location
- Houston, TX, USA
- Posts
- 6,455
- Mentioned
- 11 Post(s)
- Tagged
- 0 Thread(s)
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
-
Dec 6, 2000, 16:44 #17
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
-
Dec 6, 2000, 16:44 #18
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
very cool. what's the max?
what would be the "other way?"
Thanks,
Sam
-
Dec 6, 2000, 17:10 #19
- Join Date
- Jun 2000
- Location
- Texas, USA
- Posts
- 597
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Dec 6, 2000, 21:48 #20
- Join Date
- Apr 2000
- Location
- Los Angeles, California
- Posts
- 1,008
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Isn't blob for holding binary files...not text...?
-
Dec 6, 2000, 23:07 #21
- Join Date
- Aug 2000
- Location
- Silicon Valley
- Posts
- 2,241
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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