Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Function To Generate Data For Datetime Field In Db

$
0
0
I have designed a database with a field named creat_time. Its datatype is datetime. And when modifying the beforeSave I used date() function in php to generate data for a field. But when I check it failed (result is 0000-00-00 00:00:00 ). Can anyone tell me that I can used what function to generate this kind of data for datetime type field in MySql (PHP function).

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>