Brian Medley Posted December 6, 2009 Share Posted December 6, 2009 What is the ideal data type to use in a user field, such as when a user logs into a website, is it typically varchar(x)? And when using data types, is it proper to capitalize a type or does it not matter? e.g. varchar(x) vs. VARCHAR(x). Quote Link to comment https://forums.phpfreaks.com/topic/184128-data-types/ Share on other sites More sharing options...
fenway Posted December 6, 2009 Share Posted December 6, 2009 What's a "user field"? Quote Link to comment https://forums.phpfreaks.com/topic/184128-data-types/#findComment-972349 Share on other sites More sharing options...
Mchl Posted December 6, 2009 Share Posted December 6, 2009 What is the ideal data type to use in a user field, such as when a user logs into a website, is it typically varchar(x)? For user name you mean? Varchar's usually good choice. And when using data types, is it proper to capitalize a type or does it not matter? e.g. varchar(x) vs. VARCHAR(x). It doesn't matter (not in MySQL anyway), although one of most widely adopted conventions is to write SQL keywords in ALL CAPS. Quote Link to comment https://forums.phpfreaks.com/topic/184128-data-types/#findComment-972358 Share on other sites More sharing options...
fenway Posted December 6, 2009 Share Posted December 6, 2009 MySQL has plenty of data types -- use the right ones. Quote Link to comment https://forums.phpfreaks.com/topic/184128-data-types/#findComment-972392 Share on other sites More sharing options...
Brian Medley Posted December 6, 2009 Author Share Posted December 6, 2009 Thank you for both of your answers. And yes, I meant for it to read off as 'user name'. Quote Link to comment https://forums.phpfreaks.com/topic/184128-data-types/#findComment-972490 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.