• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Model is not producing MySQL error #1292

#1
Exclamation 
Code:
$this->set('verification_code', NULL)
    ->set('email_verified_at', "Any-string")
    ->where([
        'email'=> $email,
        'email_verified_at' => NULL,
        'verification_code' => $verification_code,
    ])->update();
CI4, CI_ENVIRONMENT = development
The Model is inserting "0000-00-00 00:00:00" in column `email_verified_at`. Why CI4 not producing a MySQL error #1292 - Incorrect datetime value?
Reply

#2
Because that is the MySQL default datetime value.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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