Snippets

Create an account or login to be able to add, comment and rate snippets.

Navigation

Schema for Creole/DB Session Storage

Here is the schema you need to set up database session storage.

CREATE TABLE `session` (
  `sess_id` varchar(32) NOT NULL,
  `sess_data` text NOT NULL,
  `sess_time` int(11) NOT NULL
);
by Romain Dorgueil on 2006-05-31, tagged cookie  creole  database  mysql  session  storage  user 

Comments on this snippet

gravatar icon
#1 Arthur Koziel on 2006-05-31 at 04:49

Why int(11) for sess_time? afaik the unix-time is int(10)

gravatar icon
#2 Guglielmo Celata on 2007-11-26 at 11:26

Shouldn't sess_id be at least unique index?

You need to create an account or log in to post a comment or rate this snippet.