我在方法中使用代码php张贴在“ tr_no_hp”列中 像
$nomorhp = $this->input->get('nomor_hp');
但是我尝试在数据库列中插入后不能为null。 如何解决这个问题
这是我的控制器代码
$nomorhp = $this->input->get('nomor_hp');
$data = array(
'us_id' => $this->user->us_id,
'sv_id' => $voucher->sv_id,
'op_id' => $voucher->op_id,
'tr_id_plgn' => $nomor,
'tr_no_hp' => $nomorhp,
);
$this->db->insert('transaksi', $data);
$trx_id =$this->db->insert_id();
我得到了这个错误代码
Query error: Column 'tr_no_hp' cannot be null - Invalid query: INSERT INTO `transaksi`
谢谢