为什么我不能在我的 MySQL 数据库中保存长文本? [英] Why i cant save a long text on my MySQL database?

查看:53
本文介绍了为什么我不能在我的 MySQL 数据库中保存长文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我的用户使用 Web 表单输入并使用 php 传递到服务器的长文本(大约 2500 个字符)保存到我的数据库中.

im trying to save to my data base a long text (about 2500 chars) input by my users using a web form and passed to the server using php.

当我查看 phpmyadmin 时,文本被裁剪.我如何配置我的表格以获得完整的文本?这是我的表配置:

When i look in phpmyadmin, the text gets crop. How can i config my table in order to get the complete text? This is my table config:

CREATE TABLE `extra_879` (
  `id` bigint(20) NOT NULL auto_increment,
  `id_user` bigint(20) NOT NULL,
  `title` varchar(300) NOT NULL,
  `content` varchar(3000) NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id_user` (`id_user`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

查看字段内容,其限制为 3000 个字符,但文本总是在 690 个字符处被裁剪.感谢您的帮助!

Take a look of the field content that have a limit of 3000 chars, but the texts always gets crop at 690 chars. Thanks for any help!

编辑:我发现了问题,但我不知道如何解决.查询总是在同一个字符中得到裁剪,一个特殊的字符:ù

EDIT: I found the problem but i dont know how to solve it. The query is getting crop always in the same char, an special char: ù

EDIT 2:这是裁剪后的查询:

INSERT INTO extra_879 (id,id_user,title,content) VALUES (NULL,'1','Informazione Extra','
Riconoscimenti
Laurea di ingegneria presa a le 22 anni e in il terso posto della promozione
Diploma analista di sistemi ottenuto il rating massimo 20/20, primo posto della promozione.
Borsa di Studio (offerta dal Ministero Esteri Italiano) vinta nel 2010 (Valutazione del territorio attraverso le nueve tecnologie)
Pubblicazione di paper; Stima del RCS della nave CCGS radar sulla base dei risultati di H. Leong e H. Wilson. http://www.ing.uc.edu.vek-azozayalarchivospdf/PAPER-Sarmiento.pdf
Tesi di laurea: PROGETTAZIONE E REALIZZAZIONE DI UN SIS-TEMA DI TELEMETRIA GSM PER IL CONTROLLO DELLO STATO DI TRANSITO VEICOLARE E CLIMA (ottenuto il punteggio pi')

就在 (ottenuto il punteggio più alto) 短语,就在 ù 出现时...

It gets crop just when the (ottenuto il punteggio più alto) phrase, just when ù appear...

EDIT 3:我使用 jquery + ajax 发送查询

EDIT 3: I using jquery + ajax to send the query

$.ajax({type: "POST",   url: "handler.php", data: "e_text="+ $('#e_text').val() + "&e_title="+ $('#extra_title').val(),

推荐答案

已经解决问题,是jquery的问题.您可以在此处查看答案:TinyMCE + Jquery + PHP + AJAX 特殊字符问题

Already solve the problem, was an jquery problem. You can check the answer here: TinyMCE + Jquery + PHP + AJAX Special chars issue

这篇关于为什么我不能在我的 MySQL 数据库中保存长文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆