pranshu82202 Posted August 19, 2011 Share Posted August 19, 2011 Can anyone tell me what does default means in phpMyandmin Database... I want to store timestamp automatically whenever user registeres to my site... can i do it by just selecting timestamp in the default column of the databse table.. Whether i need to write something in registration.php to insert the timestamp (which i set in the default column of my php databse)... Thanxx for your keen interest... -pranshu.a.11@gmail.com Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 19, 2011 Share Posted August 19, 2011 If you are talking about the "default" property for fields, yes that is the default value to be applied when a new record is created if one is not set when the record is created. So, if I have a field called 'active' with a default value of '1' then I can create new records without setting a value for that field and they will default to 1. I don't know about your version of PHPMyAdmin, but in mine if I set a field type to "timestamp" there is a checkbox that appears right below the default value text box which states states "CURRENT_TIMESTAMP". Just check that field and the field will automatically be set to the timestamp at the time the record is created - assuming you don't pass a value for the field. Quote Link to comment Share on other sites More sharing options...
pranshu82202 Posted August 19, 2011 Author Share Posted August 19, 2011 Hey mjdamato, Thanx for your reply.. I have solved my Doublt... Thanx ... Quote Link to comment 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.