Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2001
    residenza
    Napoli, Italia
    Messaggi
    1,074

    Tabella db non accetta l'intero testo

    Ho un campo di tabella (tipo: TEXT, collation: utf8_bin, tabella: MyISAM) in cui devo registrare molti dati (in un solo campo). É un testo abbastanza lungo - sono 104Kb, in formato .txt - e non lo posso splittare in più parti.
    Il problema è che il db mi taglia il testo, cioè non registra oltre una certa quantità...
    Quando faccio l'inserimento (da PHPMyAdmin) mi dice:
    Warning: #1265 Data truncated for column 'text' at row 1
    Perchè rifiuta di registrare oltre una certa quantità di testo? E come posso risolvere?
    metatad
    graphic & web design

  2. #2
    dal manuale:

    http://dev.mysql.com/doc/refman/5.0/...-overview.html

    TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]

    A TEXT column with a maximum length of 65,535 (216 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each TEXT value is stored using a two-byte length prefix that indicates the number of bytes in the value.

    An optional length M can be given for this type. If this is done, MySQL creates the column as the smallest TEXT type large enough to hold values M characters long.
    usa mediumtext tiene 16 mb

    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2001
    residenza
    Napoli, Italia
    Messaggi
    1,074
    Grazie!!!
    metatad
    graphic & web design

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.