Close connection |
(08-18-2018, 04:03 AM)InsiteFX Wrote: You would need to keep track of your query caches maybe in an array etc; Can i get query string after run it? Example: $this->db->where('ID','1'); $res = $this->db->get('user'); echo $this->db->get_compiled_select(); //here i need last query string
Did you try using:
PHP Code: $lastQuery = $this->db->last_query() The compiled method only allow getting insert, update and delete methods. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(08-17-2018, 04:21 AM)kaitenz Wrote:AFAIK, Query builder automatically close the database after use(08-17-2018, 04:07 AM)omid_student Wrote: Hi == Agree with you,but I can not find the code , can you tell me when and where did query builder automatically close the database connection?
|
Welcome Guest, Not a member yet? Register Sign In |