Login   Register  
PHP Classes
elePHPant
Icontem

File: mysql-tables.sql

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mariusz Kaczmarczyk  >  mk_db_session  >  mysql-tables.sql  >  Download  
File: mysql-tables.sql
Role: Auxiliary data
Content type: text/plain
Description: Create MySQL tables structure for session storage
Class: mk_db_session
Store and retrieve session variables in database
Author: By
Last change:
Date: 2006-05-28 02:48
Size: 930 bytes
 

Contents

Class file image Download
-- MySQL database structure for class mk_db_session by Mariusz Kaczmarczyk
-- http://www.phpclasses.org/browse/package/3143.html


-- (replace <prefix> with what you set to mk_db_session::db_table_prefix):

CREATE TABLE <prefix>session_ids (
	id INT(20) NOT NULL AUTO_INCREMENT,
	client_id_name VARCHAR(32) NOT NULL DEFAULT "",
	start_s70 BIGINT(20) NOT NULL DEFAULT "0",
	last_s70 BIGINT(20) NOT NULL DEFAULT "0",
	remote_addr VARCHAR(64) DEFAULT NULL,
	active ENUM("0", "1") DEFAULT "1",
	PRIMARY KEY (id),
	UNIQUE KEY client_id_name (client_id_name)
) COMMENT="session IDs storage";

CREATE TABLE <prefix>session_var (
	id INT(20) NOT NULL AUTO_INCREMENT,
	session_id VARCHAR(64) NOT NULL DEFAULT "",
	var_name VARCHAR(64) NOT NULL DEFAULT "",
	type ENUM("boolean", "integer", "double", "string", "array", "NULL") DEFAULT "string",
	value BLOB,
	PRIMARY KEY (id)
) COMMENT="session variables storage";