Welcome Guest, Not a member yet? Register   Sign In
How to use timestamp fields in CI4 Model?
#1

I am trying to set value for timestamp field in CodeIgniter 4 model. But I couldn't find anything relevant to date fields in the CI documentation. The only thing I see is related to automatic timestamp fields.

In CI 3 I have used it like below.

 $this->db->set('last_loggedin''CURRENT_TIMESTAMP'FALSE);
Reply
#2

(This post was last modified: 07-16-2020, 02:07 AM by InsiteFX.)

CodeIgniter 4 User Guide - Updating Data

Read down to:

PHP Code:
$builder->set(); 

Should still work the same for you.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Thank you, great help.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB