【发布时间】:2021-01-11 13:17:29
【问题描述】:
需要从 3 个当前状态 =1 的表中获取所有行
$query = $this->db->query("CALL GetALLDetails('1')");
$result = $query->result_array();
print_r($result);
存储过程:-
BEGIN
select * from table1 where current_status = status;
select * from table2 where current_status = status;
select * from table3 where current_status = status;
END
我只得到第一个查询语句的结果。
【问题讨论】:
-
也许使用事务?
-
@KUMAR 我可以确认我的场景在 CodeIgniter 中是否可行?其实我需要使用存储过程。谢谢!
标签: php codeigniter stored-procedures