I am using the code igniter framework. And I been trying to execute a stored procedure(no params) I wrote on Microsoft SQL Server 2008 from PHP but i get an error . This stored procedure runs good on Microsoft SQL Server with no errors. I am using sqlsrv as the driver and I have a PHP version 5.2 if that helps.
This is the error I get
Error Number: 01000
[Microsoft][SQL Server Native Client 10.0][SQL Server]Executing SQL directly; no cursor
Exec sp_test
The following is part of the code I have
function index(){
$this->load->database();
$query=$this->db->query("Exec sp_test");
var_dump($query->result());
}
I replace the actual query with an actual query and it does work but not with a sp call. Any help will be appreciated, I tried for so long on this and i can't get it to work. Thanks