• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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)");

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.