Accessing protected property of query object |
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?
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?
(01-28-2025, 04:36 PM)occitan Wrote: Is there a way to set the output of getLastQuery() -> finalQueryString to a variable?Yep! In CI4, you can store the last executed query like this: $finalQueryString = $db->getLastQuery()->getQuery(); |
Welcome Guest, Not a member yet? Register Sign In |