我想在視圖文件最後插入的ID的顯示值.. 我的模型顯示,鑑於最近插入的ID笨
Model_auto
$this->db->trans_start();
$this->db->insert('person',$data);
$id=$this->db->insert_id();
$this->db->query("update person set status='verified' where person_id='$id'");
$this->db->trans_complete();
return $id;
控制器
$this->model_auto->add_user();
echo '<script>alert("Data Registered Successfully");</script>';
$this->load->view('fee_view');
我不知道如何在控制器中訪問該ID,然後通過查看和顯示 那裏。提前
我試過,但它不工作...它沒有顯示在視圖時,回聲的$ id –
我試過,但它不工作......當你的模型'$ data'中的echo $ id –
來自哪裏時,它什麼都不顯示? – user2936213