Welcome Guest, Not a member yet? Register   Sign In
Accessing protected property of query object
#1

Is there a way to set the output of getLastQuery() -> finalQueryString to a variable? 
In normal PHP you use the Reflection class, is there a way to access this in CI4?
Reply
#2

Anyone?
I am making AJAX calls that return a database result and i want to return the last query so i can see it, how do I do this?
Reply
#3

(This post was last modified: 02-05-2025, 02:38 AM by JustJohnQ.)

Would something like this work:
PHP Code:
$lastQuery $this->db->getLastQuery()->__toString(); 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB