is there any possibility that there is a field called 'time' in the table and there are 3 more fields, and when I insert the 3 fields, the time field is set default to fill in the current UNIX Timestamp? It will be much appreciated if you help me out!
            Asked
            
        
        
            Active
            
        
            Viewed 2,651 times
        
    2 Answers
0
            
            
        exactly there is no any default unix_timestamp for mysql. you can set the field as a datetime or timestamp and set its default to CURRENT_TIMESTAMP. then use strtotime function to change back to unix. or set type to int or bigint ordouble and use time() function on every insert row. 
I prefer myself to use second way.
 
    
    
        Ali Qorbani
        
- 1,254
- 8
- 27
 
    