 |
สอบถามปัญหา php อ่านข้อความยาวๆจาก database มาแสดงไม่ครบครับ |
|
 |
|
|
 |
 |
|
varchar(2000) ผมว่าใช้ Text เหอะครับ   
Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions. The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used.
|
 |
 |
 |
 |
Date :
2015-01-19 16:35:52 |
By :
meannerss |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถ้ากำหนด varchar(2000) ขนาดนี้ แนะนำให้ตั้งเป็น text เลยจะดีกว่านะครับ
|
 |
 |
 |
 |
Date :
2015-01-19 16:36:22 |
By :
FreshyMusiC |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ได้ล่ะครับต้องใช้ text แทน ขอบคุณครับ แล้ว text ที่มันจำกัดจำนวนตัวข้อความที่เก็ยได้ไหมครับ เคยกรอกข้อมูลที่ยาวๆ หลาย 10 บรรทัด แต่รู้สึกจะรับได้แค่ ประมาณไม่เกิน 20 บรรทัดมั้งครับ แล้วพวกเวปนิยายที่บทหนึ่งยาวๆ เข้าใช้อะไรเก็บข้อมูลกันครับ
|
 |
 |
 |
 |
Date :
2015-01-19 16:48:21 |
By :
sinder007 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ประมาณนี้เหละครับแล้วแต่เวอร์ชั่นด้วยนะ บางเวอร์ชั่นก็ไม่เท่ากัน ปรับไป ปรับมา
TEXT TYPES
CHAR( ) A fixed section from 0 to 255 characters long.
VARCHAR( ) A variable section from 0 to 255 characters long.
TINYTEXT A string with a maximum length of 255 characters.
TEXT A string with a maximum length of 65535 characters.
BLOB A string with a maximum length of 65535 characters.
MEDIUMTEXT A string with a maximum length of 16777215 characters.
MEDIUMBLOB A string with a maximum length of 16777215 characters.
LONGTEXT A string with a maximum length of 4294967295 characters.
LONGBLOB A string with a maximum length of 4294967295 characters.
NUMBER TYPES
TINYINT( ) -128 to 127 normal
0 to 255 UNSIGNED.
SMALLINT( ) -32768 to 32767 normal
0 to 65535 UNSIGNED.
MEDIUMINT( ) -8388608 to 8388607 normal
0 to 16777215 UNSIGNED.
INT( ) -2147483648 to 2147483647 normal
0 to 4294967295 UNSIGNED.
BIGINT( ) -9223372036854775808 to 9223372036854775807 normal
0 to 18446744073709551615 UNSIGNED.
FLOAT A small number with a floating decimal point.
DOUBLE( , ) A large number with a floating decimal point.
DECIMAL( , ) A DOUBLE stored as a string , allowing for a fixed decimal point.
อันนี้โฟกัสเฉพาะประเภท TEXT ครับ
TINYTEXT – 256 bytes – 256 character
TEXT – 65,535 bytes (~64kb) – 65,535 character – around 16,383 UTF8 character
MEDIUMTEXT – 16,777,215 bytes (~16MB) – 16,777,215 character – around 4,194,303 UTF8 character
LONGTEXT – 4,294,967,295 bytes (~4GB) – 4,294,967,295 character – around 1,073,741,820 UTF8 character
|
ประวัติการแก้ไข 2015-01-19 16:53:16 2015-01-19 16:53:59
 |
 |
 |
 |
Date :
2015-01-19 16:52:15 |
By :
meannerss |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แต่ผมไม่อยากจะคิดนะครับ เมื่อเข้าไปเปิดเว็บอะไรซักอย่างแล้วมันโหลดหน้าเว็บ(แค่ข้อมูลที่เป็นtext)ทีละ 4GB มันจะโหดเว่อร์ขนาดไหน............ ต้องมี ฝั่งclient ไม่ก็ ฝั่งserver ต้องได้ตายกันไปข้างนึงแน่ๆ เหอๆ
|
 |
 |
 |
 |
Date :
2015-01-19 16:57:12 |
By :
meannerss |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|