Jump to content

how to store text larger than 255 characters?


frijole

Recommended Posts

I'm assuming your using VARCHAR. You should try TEXT or BLOB.

 

http://dev.mysql.com/doc/refman/5.0/en/string-types.html

 

Edit: Just reading the link I gave you,

 

The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions

 

So depending on your MySQL version, varchar might work for you.

I can see someone needing that if they are doing websites that are stored in databases instead of HTML files... waste of space? I don't know, I think it takes less space to put a full HTML file coded in a database rather than a seperate HTML file.

QUESTION if I may:

Why store the embed code?

why not just the URL which can then be used in the embed code generated by PHP. This will make it more flexible in the future, take less space on the server, etc...

 

that could work. although I would have to make a different script for each server, i.e. YouTube, Google Video etc. right?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.