Log in

View Full Version : how to create a session



ugnakr86
03-12-2014, 06:42 AM
how to create a session

virendra
04-14-2014, 07:28 AM
Create the "sessions" table:
CREATE TABLE `sessions` (
`id` CHAR(128) NOT NULL,
`set_time` CHAR(10) NOT NULL,
`data` text NOT NULL,
`session_key` CHAR(128) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

We use the CHAR datatype for fields we know the length of, as the fields "id" and "session_key" will always be 128 characters long. Using CHAR here saves on processing power.

revasharma2
04-23-2014, 03:19 AM
Nice post. .