for example, i want to convert this;
'SELECT * FROM table'
is there any function for this? i searched on the user guide of CI but didnt find any solution.
You can also use
$this->db->get_compiled_select(). The difference between
last_query() is that
get_compiled_select() gives the query string generated even if you don’t run the query against the database.
after you run your Active Record Query and it’ll spit out the raw SQL it ran for you. I use it often.