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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.