number of characters in Mysql

Asked

Viewed 69 times

0

Someone said that the TEXT type allows 65535 bytes, but I can’t post more than 10,000 characters, which I’m doing wrong?


This is my Table

DROP TABLE IF EXISTS `cad_materia`;
CREATE TABLE IF NOT EXISTS `cad_materia` (
  `php_id` int(11) NOT NULL AUTO_INCREMENT,
  `php_titulo` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `php_thumb` text CHARACTER SET latin1 NOT NULL,
  `php_texto` longtext NOT NULL,
  `php_categoria` text CHARACTER SET latin1 NOT NULL,
  `php_autor` text CHARACTER SET latin1 NOT NULL,
  `php_data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `php_chave` text CHARACTER SET latin1 NOT NULL,
  `url` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `cod_user` char(255) CHARACTER SET latin1 NOT NULL,
  PRIMARY KEY (`php_id`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;

Well I am a beginner, in the text I did not put any value, the error gives when I will post the text co site,

  • 2

    Good question. What is the table structure? How are you entering the values? Did you test the entry directly into the database to make sure it’s really him truncating the content? By the way, is it truncating or error during the process? Which error?

  • Basically why byte and character are different things. In utf8 multiply by three, and in utf8mb4 multiply by 4 the space reserved by Mysql - have posts mentioning this on the site, if you find already Linko here

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.