ottenuto il punteggio più alto


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(),
share|improve this question


What text are you trying to insert there? Show us your queries with data. – Sergio Tulentsev Jan 14 '12 at 14:13

@SergioTulentsev the query is not the problem, i already take a look on that, is something in the data base config who is croping the text – DomingoSL Jan 14 '12 at 14:14

Have you tried using MySQL Workbench to run the query? – juergen d Jan 14 '12 at 14:16

please check de edit i recently made – DomingoSL Jan 14 '12 at 14:22

Please add more code. Where is the INSERT SQL being called from? Where is the data being inserted into the content field coming from? – scott.korin Jan 14 '12 at 14:27
show 3 more comments

6 Answers

Answering to your updated question:
You're (apparently) trying to insert unicode text. And your table's charset is set to latin1. That's not gonna fly.
Change your table charset to utf-8.
ALTER TABLE extra_879 CONVERT TO CHARACTER SET utf8;
More info here.
share|improve this answer


Take in consideration that the problem is not the table any more, because is the query who is getting crop when an specil char occur... – DomingoSL Jan 14 '12 at 14:43

Take a look on the second edit please – DomingoSL Jan 14 '12 at 14:45

Still I think it's encoding. Check the encoding of your connection to the database. – Sergio Tulentsev Jan 14 '12 at 14:55
Try to change varchar(3000) to text (or longtext)
share|improve this answer

Try changing the table charset to the charset that support special characters...
share|improve this answer


ahh Sergio Tulentsev already answered... yeah its utf8.. Thanks... – Fahim Parkar Jan 14 '12 at 14:38
If the query is getting cropped at the character ù then you may have to replace that character with it's escaped equivalent.
share|improve this answer

There seems to be no reason why the content should be getting cropped. I tried running the INSERT statement below, with the special "ù" character and it ran successfully.
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ù alto')
What is the query that you have mentioned in EDIT 2? From where did you print it? If that query is actually running in the backend, it will always insert the cropped text because it itself doesn't contain the full text - it is missing the "ù" character and everything following it. Therefore, assuming that is the actual query, the cropping seems to be happening elsewhere.
I'm not sure how post requests are done in AJAX but is the data passed in the URL? If yes, I'll suggest you do a URL-Encode before sending the data.
share|improve this answer

up vote 0 down vote accepted
Already solve the problem, was an jquery problem. You can check the answer here: TinyMCE + Jquery + PHP + AJAX Special chars issue
share|improve this answer

Your Answer















 
By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.