• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter 4 get last query

#1
How can i  print the last query in a view ?
Reply

#2
PHP Code:
// controller
$data['lastQuery'] = $db->getLastQuery();

// view
<?= $lastQuery?>

if you need to do all of this in the view you would need and instance of the database connection
and model.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.