ballhogjoni Posted June 23, 2007 Share Posted June 23, 2007 Is there a limit to the amount of characters you can have in the varchar field in a mysql db? Link to comment https://forums.phpfreaks.com/topic/56847-solved-is-there-a-limit-to-varchar/ Share on other sites More sharing options...
per1os Posted June 23, 2007 Share Posted June 23, 2007 250 Link to comment https://forums.phpfreaks.com/topic/56847-solved-is-there-a-limit-to-varchar/#findComment-280890 Share on other sites More sharing options...
snowdog Posted June 23, 2007 Share Posted June 23, 2007 I think 255 Snowdog Link to comment https://forums.phpfreaks.com/topic/56847-solved-is-there-a-limit-to-varchar/#findComment-280891 Share on other sites More sharing options...
ballhogjoni Posted June 23, 2007 Author Share Posted June 23, 2007 What if i am trying to store code in the field? Link to comment https://forums.phpfreaks.com/topic/56847-solved-is-there-a-limit-to-varchar/#findComment-280895 Share on other sites More sharing options...
xkyogre Posted June 23, 2007 Share Posted June 23, 2007 The limit is 255 Link to comment https://forums.phpfreaks.com/topic/56847-solved-is-there-a-limit-to-varchar/#findComment-280898 Share on other sites More sharing options...
wildteen88 Posted June 23, 2007 Share Posted June 23, 2007 If you are storing more than 255 chars then use a text data which will allow to store alot of characters (over 65,000 characters) or go for mediumtext or mediumblob which allow to store over 1.5million characters. Varchar is store small amounts of text, such as a persons name, a localtion. It is not designed to store masses of text. Have a look at this cheat sheet to see what data types maximum values Link to comment https://forums.phpfreaks.com/topic/56847-solved-is-there-a-limit-to-varchar/#findComment-280899 Share on other sites More sharing options...
ballhogjoni Posted June 23, 2007 Author Share Posted June 23, 2007 thank you. Link to comment https://forums.phpfreaks.com/topic/56847-solved-is-there-a-limit-to-varchar/#findComment-280902 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.