Jump to content

DEFAULT PHPMYADMIN


pranshu82202

Recommended Posts

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...

 

[email protected]

Link to comment
https://forums.phpfreaks.com/topic/245213-default-phpmyadmin/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/245213-default-phpmyadmin/#findComment-1259494
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.