Welcome Guest, Not a member yet? Register   Sign In
how to display the blob data of table ci_sessions : resolved :)
#7

A session is intended to store a relatively limited amount of data for a specific user, usually for a limited amount of time. That data is only intended to be used by that user. One of the reasons a person might choose to store session information in the database is that they have limited control over portions of the file system in which they could securely store this data. Another would be that they may need to share the sessions between multiple servers.

Sessions are really just meant to be a low-level system to support short-term persistence of data for the site, and aren't really intended to be exposed to the users of the site. If you want data to be available to other users on the site, such as administrators, you should store it in other tables in the database. In most cases, it's better to relate long-term data about users to a longer-lived ID, like a user ID.

If you really have some compelling need to relate data to sessions for users other than the user of that session, you should build a reference table to relate the session IDs to other IDs in the system. I would recommend just inserting the reference data during login or some similar process, then maybe adding a routine to remove old data every so often or cleaning it up while generating whatever reports need the data.
Reply


Messages In This Thread
RE: how to display the blob data of table ci_sessions : resolved :) - by mwhitney - 09-14-2015, 07:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB