I have a web site that allows user to enter large strings into a database (comments, etc). What is the best way to do that? Right now I have them limited to 25 characters and the data type is varchar. Is there a better way?
VARCHAR can hold up to 8000 characters. 25 characters is too small for the comments. If you do not want to let user enter more than 8000 characters in the comments, it is better to use VARCHAR. Otherwise, you may change to TEXT. Note that TEXT datatype sometimes cause the problem.