Closed Thread
Results 1 to 5 of 5

Thread: MySQL - large text area

  1. #1
    Member Daniel Hollands is an unknown quantity at this point
    Join Date
    Jan 2001
    Location
    London, England.
    Posts
    39

    Question

    Hi there all, I have a questions relating to MySQL.

    I'm setting up a database in MySQL, and i will be using PHP to pull the info out of it, to display on the page.

    My questions is this, what type of variable should I use to story my main body text?

    I'm not sure if it would be "text" or "blob" or if ever of these has any limits.

    I need to know which type would be best to use for storing a lot of data and info in, any ideas?

    Thanx guys (and gals)
    Daniel Hollands
    The Eerie Network

  2. #2
    Pro Member Woofcat is an unknown quantity at this point Woofcat's Avatar
    Join Date
    Nov 2000
    Location
    Chicago
    Posts
    286
    Only difference between blob and text (assuming you're storing text and not binary info such as images, etc) is that in selects blob is case-sensitive and text isn't. If you never select on blob/text fields (which you generally shouldn't) it doesn't make any difference at all. I usually use text.

    blob/text:
    max 65535 characters

    mediumblob/mediumtext:
    max 16777215 characters

    longblob/longtext:
    max 4294967295 characters
    Es ist nicht leicht ein Gott zu sein

  3. #3
    Member Daniel Hollands is an unknown quantity at this point
    Join Date
    Jan 2001
    Location
    London, England.
    Posts
    39
    Thank you so much for the info, i've now gone and changed all my text's to longtext's

    What could I do if I wanted to store more than 4294967295 characters?

    not that I ever will, or think I will anyway.
    Daniel Hollands
    The Eerie Network

  4. #4
    FWS Addict Koolguy is an unknown quantity at this point Koolguy's Avatar
    Join Date
    Oct 2000
    Location
    Canada
    Posts
    934
    Well you would be pretty much screwed but remember 4294967295 chacers is 4294967295 bytes or about 4GB. Are you really gonna store that much lol.
    koolplace\dot\com - an amazingly awesome, pointless site

  5. #5
    Member Daniel Hollands is an unknown quantity at this point
    Join Date
    Jan 2001
    Location
    London, England.
    Posts
    39
    Well, I was never planning on storing that much data, after all, I only have 70MB of space

    I was just intrested
    Daniel Hollands
    The Eerie Network

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts