danielkraus Posted November 16, 2008 Share Posted November 16, 2008 I am curious to the differences in char and varchar. I don't really know what the difference is, the material I have read is some what vague, or I just don't get it.Also I need to store some fairly large chunks of content, 300-700 words a piece. I thought I would use the LONGTEXT data type, but then read about blobs and was confused as to which would work better. This information will be pulled form the database and then presented into html via php. I am just starting MySQL and php and just need a little guidance and direction. Thanx. Link to comment Share on other sites More sharing options...
Peppe L-G Posted November 16, 2008 Share Posted November 16, 2008 I am curious to the differences in char and varchar. The CHAR and VARCHAR types are declared with a length that indicates the maximum number of characters you want to store. For example, CHAR(30) can hold up to 30 characters.The length of a CHAR column is fixed to the length that you declare when you create the table. The length can be any value from 0 to 255. When CHAR values are stored, they are right-padded with spaces to the specified length. When CHAR values are retrieved, trailing spaces are removed. http://dev.mysql.com/doc/refman/5.0/en/char.htmlHope that cures your curiosity Link to comment Share on other sites More sharing options...
Synook Posted November 17, 2008 Share Posted November 17, 2008 And http://dev.mysql.com/doc/refman/5.0/en/blob.html Link to comment Share on other sites More sharing options...
danielkraus Posted November 18, 2008 Author Share Posted November 18, 2008 Thanx Guys, that helps! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.