• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mysqli $this->db->insert_id constantly returns 0

#6
'save_queries' just adds the last executed query to an array, so that it can be later returned by last_query(); it doesn't affect anything else but memory usage.

In fact, having 'save_queries' turned on (which is the default, even when you don't have it in the config) may help you debug the issue ... Do a var_dump($this->db->last_query()) right before calling insert_id().

Does it show an INSERT query? If not, there's your problem.
Reply


Messages In This Thread
RE: mysqli $this->db->insert_id constantly returns 0 - by Narf - 05-29-2015, 06:44 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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