如何在codeigniter中调用storedprocedure [英] How to call storedprocedure in codeigniter
问题描述
亲爱的朋友们,
我有存储过程名称'chef_allproducts'。它显示错误:
无法重新打开表:'ci'调用chef_allProducts()
我尝试了什么:
i在下面的codeigniter中试过这个:
模态:
$ query = $ this-> db-> query(CALL chef_allProducts());
返回$ query-> result() ;
控制器:
$ data ['field'] = $ this-> Excelex-> get_field();
$ this-> load-> view('excel',$ data);
查看:
foreach($ field $ f):
echo $ f;
endforeach;
query =
this-> db-> query(CALL chef_allProducts());
return
< blockquote> query-> result();
控制器:
Dear Friends,
I have stored procedure name 'chef_allproducts'. It shows an error:
Can't reopen table: 'ci' call chef_allProducts()
What I have tried:
i have tried this in codeigniter below:
Modal:
$query = $this->db->query("CALL chef_allProducts()");
return $query->result();
Controller:
$data['field'] = $this->Excelex->get_field();
$this->load->view('excel', $data);
View:
foreach($field as $f):
echo $f;
endforeach;
query =
this->db->query("CALL chef_allProducts()");
return
query->result();
Controller:
这篇关于如何在codeigniter中调用storedprocedure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!