framework/web/CDbHttpSession.php
protected function createSessionTable($db,$tableName)
	{
		switch($db->getDriverName())
		{
			case 'mysql':
				$blob='LONGBLOB';
				break;
			case 'pgsql':
				$blob='BYTEA';
				break;
			case 'sqlsrv':
			case 'mssql':
			case 'dblib':
				$blob='VARBINARY(MAX)';
				break;
			default:
				$blob='BLOB';
				break;
		}
		$db->createCommand()->createTable($tableName,array(
			'id'=>'CHAR(32) PRIMARY KEY',
			'expire'=>'integer',
			'data'=>$blob,
		));
	}
protected function createSessionTable($db,$tableName)
	{
		switch($db->getDriverName())
		{
			case 'mysql':
				$blob='LONGBLOB';
				break;
			case 'pgsql':
				$blob='BYTEA';
				break;
			case 'sqlsrv':
			case 'mssql':
			case 'dblib':
				$blob='VARBINARY(MAX)';
				break;
			default:
				$blob='BLOB';
				break;
		}
		$db->createCommand()->createTable($tableName,array(
			'id'=>'CHAR(32) PRIMARY KEY',
			'expire'=>'integer',
			'data'=>$blob,
		));
	}
protected function createSessionTable ( $ db , $ tableName ) { switch ( $ db -> getDriverName ( ) ) { case 'mysql' : $ blob = 'LONGBLOB' ; break ; case 'pgsql' : $ blob = 'BYTEA' ; break ; case 'sqlsrv' : case 'mssql' : case 'dblib' : $ blob = 'VARBINARY(MAX)' ; break ; default : $ blob = 'BLOB' ; break ; } $ db -> createCommand ( ) -> createTable ( $ tableName , array ( 'id' => 'CHAR(32) PRIMARY KEY' , 'expire' => 'integer' , 'data' => $ blob , ) ) ; }
Creates the session DB table.
@param CDbConnection $db the database connection
@param string $tableName the name of the table to be created
Creates the session DB table .