在codeigniter中,当在存储过程中使用insert语句时,我无法从Microsoft sql server中的ResultSet
检索值。
当我使用此程序时:
CREATE PROCEDURE prcTest AS
BEGIN
select 'test' as test
END
我在ResultSet
的测试中得到了价值测试。
但是当我使用这个程序时:
CREATE PROCEDURE prcTest AS
BEGIN
insert into test_prc values (2)
select 'test' as test
END
我从CodeIgniter ResultSet
得不到任何东西。我正在使用foreach($result->result_array() as $row)
来获取ResultSet
。
答案 0 :(得分:1)
试试这个:
insert into test_prc select 'test' as test