Use the below query to display the query string:
To display the query result follow this:
The Profiler Class can display benchmark results, queries you have run, and $_POST data at the bottom of your pages.
To enable the profiler place the below line anywhere within your Controller methods like this:
Profiling user guide: https://www.codeigniter.com/user_guide/general/profiling.html
You can learn in-depth about SQL statements, queries and become proficient in SQL queries by enrolling in our industry-recognized SQL online course.