Welcome Guest, Not a member yet? Register   Sign In
execute mysql stored procedure


i've a stored procedure. when i run it in my admin page, it gave me a results. But when i executed it from my Model, it gave me an empty result.

Here is my code to execute it :

public function get_data($id, $id_sub){

$sql_query=$this->db->query("call sp_get_deep('".$id."','".$id_sub."')");     //--> Give me an empty result.
    mysqli_next_result( $this->db->conn_id);
                return $sql_query->row_array();

Attached Files Thumbnail(s)


What is the output from the stored procedure suppose to be? Maybe you should to a var_dump of $sql_query to see what is in it.

Maybe get rid of the single and double quotes around $id and $id_sub:

$sql_query=$this->db->query("call sp_get_deep($id, $id_sub)");

Theme © iAndrew 2016 - Forum software by © MyBB