这是我想要做的基本结构。感谢您的建议。
public function a()
{
$query = $this->db->get('a');
return $query;
}
public function update(){
//how to pass data here from function a
//like $query->id
//$query->name
}
答案 0 :(得分:1)
public function a()
{
$query = $this->db->get('a');
$this->update($query);
}
public function update($query)
{
$id = $query->row()->id; //depends on $query contents
}