dadamssg Posted January 14, 2009 Share Posted January 14, 2009 Im trying to create a type of forum application. I want the user to fill out a form and one part of the form is the description. I want to store and use it exactly like this forum is using my post. How do i store a large amount of text if the character limit in the sql database is only 255? any suggestions would be much appreciated Quote Link to comment https://forums.phpfreaks.com/topic/140837-how-to-store-paragraphs-in-database/ Share on other sites More sharing options...
rhodesa Posted January 14, 2009 Share Posted January 14, 2009 the datatype for the fields should be TEXT Quote Link to comment https://forums.phpfreaks.com/topic/140837-how-to-store-paragraphs-in-database/#findComment-737139 Share on other sites More sharing options...
dadamssg Posted January 14, 2009 Author Share Posted January 14, 2009 right...but im concerned with what to set the MySQL data type to...as in CHAR (), VARCHAR(), etc. theres a problem with both of those because the max input can only be 255 characters. how do i make it to where i can store any amount of text? Quote Link to comment https://forums.phpfreaks.com/topic/140837-how-to-store-paragraphs-in-database/#findComment-737163 Share on other sites More sharing options...
rhodesa Posted January 14, 2009 Share Posted January 14, 2009 no...TEXT is a dataype Quote Link to comment https://forums.phpfreaks.com/topic/140837-how-to-store-paragraphs-in-database/#findComment-737199 Share on other sites More sharing options...
dadamssg Posted January 14, 2009 Author Share Posted January 14, 2009 wow, im an idiot. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/140837-how-to-store-paragraphs-in-database/#findComment-737203 Share on other sites More sharing options...
Boo-urns Posted January 23, 2009 Share Posted January 23, 2009 also if you're not familiar with parsing text blocks use: nl2br($yourParagraph); // creates the paragraphs instead of mashing everything together Quote Link to comment https://forums.phpfreaks.com/topic/140837-how-to-store-paragraphs-in-database/#findComment-744506 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.