3raser Posted October 16, 2012 Share Posted October 16, 2012 I'm going for the most efficient setup I can get for my MySQL structure. Would you recommend making the field type of "lastlogin" (the last login for a user) a timestamp or date? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/269539-feedback-on-lastlogin-field/ Share on other sites More sharing options...
ManiacDan Posted October 16, 2012 Share Posted October 16, 2012 Both datetime and timestamp are valid. Timestamp is slightly smaller to store and slightly faster to calculate, but it's doubtful either of those will ever be your biggest concern. Date is not valid for this, since it doesn't include a time. Quote Link to comment https://forums.phpfreaks.com/topic/269539-feedback-on-lastlogin-field/#findComment-1385596 Share on other sites More sharing options...
3raser Posted October 16, 2012 Author Share Posted October 16, 2012 Both datetime and timestamp are valid. Timestamp is slightly smaller to store and slightly faster to calculate, but it's doubtful either of those will ever be your biggest concern. Date is not valid for this, since it doesn't include a time. Thanks Maniac. Quote Link to comment https://forums.phpfreaks.com/topic/269539-feedback-on-lastlogin-field/#findComment-1385602 Share on other sites More sharing options...
fenway Posted October 21, 2012 Share Posted October 21, 2012 The usual consideration is whether or not you want it to be timezone aware. Quote Link to comment https://forums.phpfreaks.com/topic/269539-feedback-on-lastlogin-field/#findComment-1386765 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.