CodeIgniter Forums

Full Version: Two procedures continuesly not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If I'm executing only 1 procedure in the model - all works fine, but 2 returns nothing. If I use simple query(not procedure) in first part, all is working fine

For example:

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
   class Newroom_model extends CI_Model {

       function __construct()

       function get()

           $query=$this->db->query("call GetHomeTypes()");
           $res = $query->result_array();
           $query2=$this->db->query("call GetRoomTypes()");
           $res1 = $query2->result_array();

           // print_r($data);
           return $data;
Try adding this:

PHP Code:


This usually happens because the first query has not finished running.