Welcome Guest, Not a member yet? Register   Sign In
CI3 WHERE and ORDER_BY errors
#5

Oh, I see ...

Well, if you put a die() call after flush_cache(), there shouldn't be an issue. For portability reasons, the session database driver uses the query builder class ... you probably know that already.

The difference in that between CI2 and CI3 is that in version 3, there's only one UPDATE query sent to the database and that's at the end of script execution or whenever you call session_write_close(). So, you probably have some query cache active at the end of your program's logic.
CI2 on the other hand, immediately writes to the database each time you call sess_userdata() and presumably, your application doesn't have any query cache at those points.

Perhaps we could change the driver to call flush_cache() itself before constructing its UPDATE query, but I'm not really a fan of this ... it will break another use case.

And yes, CI will automatically delete inactive session files, you don't need to setup a cron job.
Reply


Messages In This Thread
CI3 WHERE and ORDER_BY errors - by pkMyt1 - 02-21-2015, 09:52 PM
RE: CI3 WHERE and ORDER_BY errors - by Narf - 02-22-2015, 07:50 AM
RE: CI3 WHERE and ORDER_BY errors - by pkMyt1 - 02-22-2015, 08:07 AM
RE: CI3 WHERE and ORDER_BY errors - by pkMyt1 - 02-22-2015, 08:28 PM
RE: CI3 WHERE and ORDER_BY errors - by Narf - 02-23-2015, 07:28 AM
RE: CI3 WHERE and ORDER_BY errors - by pkMyt1 - 02-23-2015, 10:52 AM
RE: CI3 WHERE and ORDER_BY errors - by Narf - 02-23-2015, 12:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB