![](/img/trans.png)
[英]Is there a function in CodeIgniter to get all rows of the database query result as single array?
[英]Not able to call php function after database query result codeigniter
请找到下面的代码
//--Sec A--
$query = $this->db->insert('test',$insert_data);
$data['test_data'] = $query->result();
// --Sec B--- code to get inserted row
$this->addPanels($panArr,$job_Id,$test_Id);//$test_Id is result of Sec B
echo json_encode($data);//Result of Sec A
我无法理解为什么我无法获得 addPanels() 的结果
//--Sec A--
$query = $this->db->insert('test',$insert_data);
$data['test_data'] = $query->result();
//The insert ID number when performing database inserts.
$test_Id = $this->db->insert_id();
// --Sec B--- code to get inserted row
$this->addPanels($panArr,$job_Id,$test_Id);//$test_Id is result of Sec B
echo json_encode($data);//Result of Sec A
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.