📅  最后修改于: 2022-03-11 14:56:28.053000             🧑  作者: Mango
$data = array(
'user_id' => $user_id,
'otp' => $otp
);
$this->db->set('create_at', 'NOW()', FALSE);
$this->db->insert('otp_expiry', $data);
//or 1 day expire
$this->db->set('create_at', 'NOW() + INTERVAL 1 DAY', FALSE);
$this->db->insert('otp_expiry', $data);