我正在尝试运行一个程序,但出现此错误
Commands out of sync; you can't run this command now
这是我得到的原始错误
命令不同步;你现在不能运行这个命令
SELECT DISTINCT `property_id`, `pin`, `block_id`, `serial_no`, `status`, `ex_sn`, `ex_code`, `property_date_time`, `street_add`, `lab_name` FROM `view_property_user_lab` WHERE status = '6' AND lab_id = '01' AND designation IN( '5','6') LIMIT 10
任何人都可以告诉我为什么会出现此错误以及如何消除它。我正在使用代码点火器,我也尝试过这个
$query->free_result().
在我的程序中我使用了这个语句
SELECT *
FROM
temp_calculated_rates_and_rules;
-- and then
TRUNCATE temp_calculated_rates_and_rules;
因为这个东西在 PHP Loop 中被称为这样
$arrIds = array('5','10');
foreach ($arrIds as $id)
{
$this->_StoredProcedureMapper->setPId($id);
$p10values = $this->_StoredProcedureMapper->fetch_p10_values();
if (intval(@$p10values[0]['is_exempted']) != 1)
{
$this->generate_p10($p10values);
}
}
这是映射器函数
function fetch_p1_values()
{
$qry = "CALL sp_main_pt10(?)";
$result = $this->db->query($qry, $this->getPId());
return $result->result_array();
}
我正在使用“mysqli”驱动程序