• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.