Prodigal Son Posted September 27, 2008 Share Posted September 27, 2008 I started changing a few of my table fields to text. Not really sure how long they will be. But I previously used varchar(500) for everything ??? I *think* it won't go over 500, but if it does, I don't want it to cut off. So do I use a text field in this situation, or maybe something else? Quote Link to comment https://forums.phpfreaks.com/topic/126016-solved-what-to-use-for-field-in-which-you-dont-know-the-length/ Share on other sites More sharing options...
corbin Posted September 27, 2008 Share Posted September 27, 2008 If you're that worried about it, just use text. If you plan on having an index on it, text might not be the best choice though, if you're fairly sure the text won't go over x. Quote Link to comment https://forums.phpfreaks.com/topic/126016-solved-what-to-use-for-field-in-which-you-dont-know-the-length/#findComment-651664 Share on other sites More sharing options...
Prodigal Son Posted September 27, 2008 Author Share Posted September 27, 2008 If you're that worried about it, just use text. If you plan on having an index on it, text might not be the best choice though, if you're fairly sure the text won't go over x. Nope I probably won't be using an index on it. I changed it to text, the size grew around 2kb, which is fine I guess. Quote Link to comment https://forums.phpfreaks.com/topic/126016-solved-what-to-use-for-field-in-which-you-dont-know-the-length/#findComment-651913 Share on other sites More sharing options...
fenway Posted September 29, 2008 Share Posted September 29, 2008 Please don't use TEXT.... it's horrible... if you're using mysql5, varchar goes up to 65k. Quote Link to comment https://forums.phpfreaks.com/topic/126016-solved-what-to-use-for-field-in-which-you-dont-know-the-length/#findComment-653349 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.