Jump to content

Storeage Length


SoireeExtreme

Recommended Posts

Sorry if this isn't the right place to ask this. But I don't know mysql very well nor php for that matter.

But I have a forum. And it only allows you to type so many characters. So you can't say all you have to say in one post you would have to type 2 or 3 pots just to get your point across. How would I get the database to save move characters? Or a bigger post so to speak? Thanks if anyone can help.
Link to comment
https://forums.phpfreaks.com/topic/27822-storeage-length/
Share on other sites

change the column type

[code]ALTER TABLE table_name CHANGE column_name column_name TEXT NOT NULL;[/code]

If your using VARCHAR, you could switch to TEXT, with the query above.

[code]ALTER TABLE table_name CHANGE column_name column_name MEDIUMTEXT NOT NULL;[/code]

If your using TEXT, you could switch to MEDIUMTEXT, with the query above.

To be safe always check your table column type before altering it, Also if your using MySQL 5 and some versions of MySQL 4 you can add the language settings for that column when you alter it!

// example...

[code]ALTER TABLE table_name CHANGE column_name column_name TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;[/code]

But read the manual [url=http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html]storage types and requirements[/url], to learn the best way to change your table or column settings...

printf
Link to comment
https://forums.phpfreaks.com/topic/27822-storeage-length/#findComment-127329
Share on other sites

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.