php - Codeigniter sessions queries with multiple users and repeat logins -
a few questions before start project in codeigniter
- how long codeigniter store data in session table particular user. long logged in?
- how can modify schema of sessions table, mean modifying
datatypes
of present schema. - above question brings me one, can change session table schema itself?
- can put in multiple cookies on user's browser through single
session id
. - how can access
session
table throughmysql
console or accessible through codeigniter - when user logs in website again, how cookies website stored during user's previous login available me reading. how can read them?
i know might have been asked in bits , peices before wanted have clear picture in mind before start project. in advance
codeigniter uses cookies sessions , set expiry time in config.php file. not sure how long stores actual database info (it isn't long) , rewrite new entry user when log in. it's not recommended store critical data in session table isn't stored elsewhere. long cookie persists information restored if delete cookie you'll lose data. if need store permanently on user don't use session table.
i have no idea why you'd want change data types of present schema , screw system being able store data anyway without extending session library. seems huge headache me no real value.
answered 3 already, don't add schema, create new table if need store more info.
as 4, 5 , 6. since ci uses cookies it's sessions store in session cookie , there until expires or user deletes cookies.
save info session:
$this->session->set_userdata('some_key','some value key');
retrieve it:
$data = $this->session->userdata('some_key');
read more here: http://ellislab.com/codeigniter/user-guide/libraries/sessions.html
Comments
Post a Comment