0
调用过程我打电话代码点火器的程序,当我尝试打电话给另外一个程序,我得到以下错误:错误时在代码点火器
Error Number: 2014
Commands out of sync; you can't run this command now
call get_post_info($id)
Filename: C:/Apache24/htdocs/application/models/Posts_model.php
Line Number: 18
我想我需要清除结果集.. 。 不确定。
Here is my model :
<?php class Posts_model extends CI_Model {
public function __construct()
{
$this->load->database();
}
public function get_post_ids($acc_id){
$query = $this->db->query('call get_post_ids('.$this->db->escape($acc_id).')');
return $query->row_array();
}
public function get_post($id)
{
$query = $this->db->query('call get_post_info($id)');
return $query->row_array();
}
}
在我的控制器:
$post_ids = $this->posts_model->get_post_ids(1);
foreach ($post_ids as $id){
array_push($data, $this->posts_model->get_post($id));
}
你能用你的模型函数编辑你的问题吗 – user4419336