Echo query before execution and without execution in codeigniter Active Record

后端 未结 5 1702
后悔当初
后悔当初 2020-12-08 10:43

I am looking for a way to see generated string of the query but without executing it.

Note that the query hasn\'t been executed before. (I do not wa

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 11:28

    You can see the compiled query by either of these functions

    /* SELECT */ $this->db->_compile_select();
    /* INSERT */ $this->db->_insert();
    /* UPDATE */ $this->db->_update();
    

提交回复
热议问题