file list and long info

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
Plauderer
Posts: 26
Joined: Tue 3. Aug 2004, 13:26

file list and long info

Post by Plauderer »

Hi,

I tried to use the file-list content type and was a bit dissapointed that it makes no use of the files long info. So i wanted to add it to the function. But there i realized that the files long info is stored as a binary (!!!) within the database. Why that? Or is that a bug?
I was able to change the value type to varchar(255) but i'm still wondering about the binary type. :)

Cheers, Plauderer

P.S.: Release 1.1-RC4 22-06-2004
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

http://dev.mysql.com/doc/mysql/en/BLOB.html

VARCHAR can never be more than 255 characters, but the the *TEXT or *BLOB variants can exceed that. One could use MEDIUMTEXT, but you cannot specify the column size as with a VARCHAR. Also, they cannot have default values.

There is no column type in MySQL that is unlimited, but a LONGTEXT or LONGBLOB can have up to 4.2 billion characters. (that's probably just a little more than needed here.) :wink:

BTW, files "short info" is ~already~ varchar(255), for your purpose, if that is all you need!
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

no bug. that's normal. there is no difference when storing as TEXT or BLOB.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Locked