Why i cant save a long text on my MySQL database?

Posted by DomingoSL on Stack Overflow See other posts from Stack Overflow or by DomingoSL
Published on 2012-01-14T14:11:33Z Indexed on 2012/09/04 21:38 UTC
Read the original article Hit count: 260

Filed under:
|

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.

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 ;

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: This is the cropped query:

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')

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

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(),

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql