gpt4 book ai didi

php - 数据库查询结果codeigniter后无法调用php函数

转载 作者:行者123 更新时间:2023-11-28 23:33:40 25 4
gpt4 key购买 nike

请看下面的代码

//--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

关于php - 数据库查询结果codeigniter后无法调用php函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36466137/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com