CodeIgniter Forums
Profiler Enabled Fixes Database SQL Update - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: Profiler Enabled Fixes Database SQL Update (/showthread.php?tid=663)



Profiler Enabled Fixes Database SQL Update - iobod - 01-02-2015

Hi,
  I've got a hyperlink in a view that downloads a generated PDF (a lab badge).  Each generated PDF receives a successive number for individual badge tracking (autoincrement), different from their user id.  I do a db->update to set previous badges to inactive and THEN an insert for the new badge information.

However, I'm finding that the update and insert never happens unless attempted several minutes later.  BUT, if I enable the profiler in the badge generating controller, everything flows like it should.

Any ideas?

Thanks.


RE: Profiler Enabled Fixes Database SQL Update - Rufnex - 01-07-2015

Could it be that the update will be done after the pdf is generated or the download is forced? in this case the update will be done after the download is finished and i could be a gap on big generated files and the following sql function.