Welcome Guest, Not a member yet? Register   Sign In
Model query builder problem!
#1

Hi everyone!
I have a problem when use pure sql query in model function like this:
Code:
$query = "exec GetCellEqu @pShipId=N?,@pShipYear=N?,@pShipVoy=N?,@GroupFactor=N?";
$data = array(parameter1,parameter2,parameter3,parameter4);

$result = $this->db->query($query, $data)->result_array();

return $result;

and $result just return an empty array. But when i get that query string and run it in sql server, it able to return result.

Thanks.
Reply
#2

SEE: The CodeIgniter User's Guide - Query Builder

Query Binding
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB