Member Avatar for LastMitch

Hi,

The past few weeks, I been creating tables and I usually used TEXT but I realized if I have alot of data to type in. If I echo the data will it not echo if I don't have enough Space usage?

I used Godaddy

Space Usage
Type Usage
Data - 524
Index - 2,048
Total - 2,572

Would LONG TEXT will be a better choice? I don't know and I'm too sure that's why I post this thread to find out more about LONG TEXT or TEXT. I want to know what you or other members used frequently. What you or other members experience with it too. I just start to learn MYSQL and MYSQLI (very hard to understand) and I realizes that they function differently. I appreciate any suggestion or opinion. Thanks!

Recommended Answers

All 8 Replies

You should base your choice on your requirements. Do you need more then 64K characters ? If not, use TEXT. LONGTEXT stores up to 4GB.

Apart from that... since you are starting anyway, drop MySQL, and learn MySQLi and/or PDO. Then you will at least learn the right way. The main reason for dropping MySQL is that it is no longer maintained, and some functions just don't work with it. Here is a nice comparison.

commented: Thanks for the input! Thanks for the link too! +2
Member Avatar for diafol

Interesting question. I don't know whether Travus' link will help much as it doesn't really get to grips with which to use. Longtext requires more memory than Text, regardless of the data held within.

Text will not hold a massive amount of data (64K) - it's not that bad! what's that about 3000 text words???
Longtext, I think can store about 4Gb - bit of overkill??
Mediumtext may suit your needs better at about 16Mb

Here's some happy info:

http://forums.mysql.com/read.php?10,157804,157804#msg-157804

commented: Thanks for the explanation & link! +2
Member Avatar for iamthwee

since you are starting anyway, drop MySQL, and learn MySQLi and/or PDO

Holy crap when did this happen?

Announced Jul 2010, the first link in the comparison link I posted ;)

Member Avatar for LastMitch

@Travus

Thanks for the reply! Thanks for the link and input. I went to that link already! I didn't understand what the article is talking about. But thanks for the input!

Member Avatar for LastMitch

@pritaeas

Thanks for the reply! Thanks for the link and input!

Apart from that... since you are starting anyway, drop MySQL, and learn MySQLi and/or PDO.

I will learn MYSQLi now it's really different from MySQL. PDO is good but too advance for me.

Do you know any other sites like the one you provided that have examples for me to practice?

I try to look for one but it's hard to find one.

I been reference back to this to learn to change the function from MySQL.

http://php.net/manual/en/book.mysqli.php

I appreciate again for taking your time to explaining things to me. Thanks!

I forgot to mention. I'm having a hard time installing "PEAR Package". The past few nights it's been frustrating, I thought it would be easy but it's not. I will create another thread for that. Thanks!

Member Avatar for LastMitch

@Ardav

Thanks for the reply! Thanks for the link and input!

Longtext requires more memory than Text, regardless of the data held within.

Text will not hold a massive amount of data (64K) - it's not that bad! what's that about 3000 text words???
Longtext, I think can store about 4Gb - bit of overkill??
Mediumtext may suit your needs better at about 16Mb

I like the explanation it makes alot of sense! Thanks! TEXT will be it!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.