diff options
author | Greg Aker <greg.aker@ellislab.com> | 2011-04-20 18:22:09 +0200 |
---|---|---|
committer | Greg Aker <greg.aker@ellislab.com> | 2011-04-20 18:22:09 +0200 |
commit | 882b76bda8b701a8718960b8d639f060ae79e998 (patch) | |
tree | 3824aa7ef8f5f053d6315e9257dc951d1753a932 /user_guide/libraries | |
parent | 1cdb0fd21e0c5ac38a75712806ed10b08f0909cc (diff) |
Fixed a bug (Reactor #231) where Sessions Library database table example SQL did not contain an index on last_activity. See <a href="installation/upgrade_203.html">Upgrade Notes</a>
Fixed a bug (Reactor #229) where the Sessions Library example SQL in the documentation contained incorrect SQL.
Diffstat (limited to 'user_guide/libraries')
-rw-r--r-- | user_guide/libraries/sessions.html | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html index 8d9c14eb6..6048f4809 100644 --- a/user_guide/libraries/sessions.html +++ b/user_guide/libraries/sessions.html @@ -218,15 +218,17 @@ be updated, they can only be generated when a new session is created.</p> <p>In order to store sessions, you must first create a database table for this purpose. Here is the basic prototype (for MySQL) required by the session class:</p> -<textarea class="textarea" style="width:100%" cols="50" rows="8"> +<textarea class="textarea" style="width:100%" cols="50" rows="10"> CREATE TABLE IF NOT EXISTS `ci_sessions` ( -session_id varchar(40) DEFAULT '0' NOT NULL, -ip_address varchar(16) DEFAULT '0' NOT NULL, -user_agent varchar(50) NOT NULL, -last_activity int(10) unsigned DEFAULT 0 NOT NULL, -user_data text DEFAULT '' NOT NULL, -PRIMARY KEY (session_id) -);</textarea> + session_id varchar(40) DEFAULT '0' NOT NULL, + ip_address varchar(16) DEFAULT '0' NOT NULL, + user_agent varchar(50) NOT NULL, + last_activity int(10) unsigned DEFAULT 0 NOT NULL, + user_data text NOT NULL, + PRIMARY KEY (session_id), + KEY `last_activity_idx` (`last_activity`) +); +</textarea> <p><strong>Note:</strong> By default the table is called <dfn>ci_sessions</dfn>, but you can name it anything you want as long as you update the <kbd>application/config/config.php</kbd> file so that it contains the name you have chosen. |