Welcome Guest, Not a member yet? Register   Sign In
Model created_at , updated_at
#1

Hi sorry for english , i want know how is the correct way to set model an table about created_at and updated_at .

In table must i set as timestamp or datetime ? in option ?
Reply
#2

It goes by this.

[b]$dateFormat[/b]

This value works with $useTimestamps and $useSoftDeletes to ensure that the correct type of date value gets inserted into the database. By default, this creates DATETIME values, but valid options are: datetime, date, or int (a PHP timestamp). Using ‘useSoftDeletes’ or ‘useTimestamps’ with an invalid or missing dateFormat will cause an exception.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB