I am doing a project where user can post text, i have used TinyText.
i need to know how much input user should be allowed to do ?
i came to know TinyText allows only 255 characters to be entered from
http://www.htmlite.com/mysql003.php
But if a user enters & then it have to be converted to & and so...
So what should be the ideal size allowed to be inputted from the users for these field/data types
TinyText
Text
User can insert data, but can not edit !
An user can view others data !
So, view will be used mostly !
TEXT: 65,535 characters - 64 KB The standard TEXT data object is sufficiently capable of handling typical long-form text content. TEXT data objects top out at 64 KB (expressed as 2^16 -1) or 65,535 characters and requires a 2 byte overhead.
The maxlength attribute specifies the maximum number of characters that can be entered. By default, the maximum is 524,288 characters.
Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used.
Here you can find details about MySQL text type: http://dev.mysql.com/doc/refman/5.0/en/blob.html
I don't think replacing html entities and insert them into your database lets you control the final length that is inserted into your tinytext.
I'd go for 2 options.
Depending on your application I'd pick one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With