From e7e4cb60be2ea777d324560a207db1f445d83bc8 Mon Sep 17 00:00:00 2001 From: Julio Vergara Date: Sat, 3 Jun 2017 16:35:05 -0400 Subject: [PATCH] =?UTF-8?q?Cambio=20de=20acuerdo=20a=20la=20documentaci?= =?UTF-8?q?=C3=B3n=20de=20Codeigniter=20=20--->=20=20Make=20sure=20to=20us?= =?UTF-8?q?e=20$this->db->trans=5Fbegin()=20when=20running=20manual=20tran?= =?UTF-8?q?sactions,=20NOT=20$this->db->trans=5Fstart().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/MyModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/MyModel.php b/application/models/MyModel.php index bbbb18b..e95d751 100644 --- a/application/models/MyModel.php +++ b/application/models/MyModel.php @@ -32,7 +32,7 @@ public function login($username,$password) $last_login = date('Y-m-d H:i:s'); $token = crypt(substr( md5(rand()), 0, 7)); $expired_at = date("Y-m-d H:i:s", strtotime('+12 hours')); - $this->db->trans_start(); + $this->db->trans_begin(); $this->db->where('id',$id)->update('users',array('last_login' => $last_login)); $this->db->insert('users_authentication',array('users_id' => $id,'token' => $token,'expired_at' => $expired_at)); if ($this->db->trans_status() === FALSE){