• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$this->db->lastquery() not working

Hi, did you figure out what is the problem?

I have the same issue now.

echo $this->db->last_query();

Just return nothing but the query was successful.

Change the name of your Model to like Some_model!


found out my problem. My database default set up set $db['default']['save_queries'] = FALSE;

Because queries are not saved, so last_query won't return anything.

I need to add this line before the query to get $this->db->last_query();

$this->db->save_queries = true;

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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