What is the best type for a long line of text?

Discussion in 'MySQL' started by Imozeb, Feb 23, 2010.

  1. #1
    What is the best type to use for a big paragraph of text like 1000+ words? I tried to use 'text' type but it kept on not entering the data when it was about 20 words. It only accepted like 5 or so words. Why is this and is there a better type I can use for this function?

    Thanks.
     
    Imozeb, Feb 23, 2010 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    text type holds up to 64kb of data.It should work for almost all your needs. Where are you viewing the field? in phpmyadmin? or is it being outputted by a php script?
     
    shallowink, Feb 23, 2010 IP
  3. Imozeb

    Imozeb Peon

    Messages:
    666
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, I'm viewing the field in PHPmyadmin. The form gets submited to PHP which enters the data into the database.

    I really don't understand why it won't work because if I only type 2 words it enters the data into the database fine, but if I enter a short paragraph like I want, it goes through the entire PHP script giving no error; but the data (including about 8 other data fields) doesn't appear in my database.

    Plz help! :)
     
    Imozeb, Feb 24, 2010 IP
  4. Imozeb

    Imozeb Peon

    Messages:
    666
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Mabye are there any other types I can use that would work better?
     
    Imozeb, Feb 24, 2010 IP
  5. hireme

    hireme Member

    Messages:
    58
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    45
    #5
    Are you sure you're looking at the data? try 'editing' an entry. :)
     
    hireme, Feb 25, 2010 IP
  6. Imozeb

    Imozeb Peon

    Messages:
    666
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It works from PHPadmin but not when I use my PHP script to enter data. So... are there any other datatypes I can use?
     
    Imozeb, Feb 26, 2010 IP