I have defined a column in my MySQL database as :
ALTER TABLE `my_table` CHANGE `desc` `desc` VARCHAR( 255 )
CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
However, when I enter text that is longer than 233 characters from my front end the data is truncated.
Changing the size of the column to varchar(511) has made no difference.
I counted the number of characters using PHP's strlen() function and it revealed 233 characters.
Why is MySQL doing this, and how can I save the full string?
SELECT LENGTH(`desc`), CHAR_LENGTH(`desc`) FROM my_table;Are there differences? – ypercube Oct 2 '12 at 8:13