Click to See Complete Forum and Search --> : what data type would be necessary?
ixxalnxxi
10-07-2007, 07:43 PM
i was going to make an archive of articles on a database and have the site completely database driven, so what data type should the field be where i keep the body of the article?
pretty much i'm asking what data type holds the most text, so that i would be able to successfully store the article in there ? thanks ~
NogDog
10-07-2007, 07:49 PM
It probably depends on which DBMS you are using. For MySQL, you would use TEXT, MEDIUMTEXT, or LONGTEXT which hold, respectively 2^16 bytes, 2^24 bytes, or 2^32 bytes.
ixxalnxxi
10-07-2007, 08:33 PM
is there a place i can go where i can see how much storage 2^16 or 2^32 bytes is ?
i'm unfamiliar with data types as you can tell, as well as how much information a byte is.
thanks ~ sorry for the ignorance =)
NightShift58
10-08-2007, 12:53 AM
You can go to PHP...
<?php
echo "2 ^ 16 : " . pow(2,16)/1024 . " KB<br>";
echo "2 ^ 24 : " . pow(2,24)/1024 . " KB<br>";
echo "2 ^ 32 : " . pow(2,32)/1024 . " KB<br>";
?>