Question: How to get the last query

How to get the last query

Hi, I try this way... in controller. and in model. $data['prdata'] = $this->reports_model->getSalesReport2($rpdata); $last_qry =$this->db->last_query(); but nothing and not working. Ho

김진수

Asked
Hi, I try this way... in controller. and in model.
$data['prdata'] = $this->reports_model->getSalesReport2($rpdata);
$last_qry =$this->db->last_query();

but nothing and not working.

How to get the last query?
  • MS

    Mian Saleem

    Answered
    Hello,

    You are trying correct `$this->db->last_query()` to get query. I have not much knowledge as never used it, you can refer to CodeIgniter Documentation.

    Thank you
  • Login to Reply