chatsys.sql

< Back |Related >


This file contains the SQL query which produces the empty tables

-- MySQL dump 8.22
--
-- Host: mysql    Database: bibliosview
---------------------------------------------------------
-- Server version       3.23.54

--
-- Table structure for table 'chat_main' Comment
--

CREATE TABLE chat_main (
  c_from varchar(20) default NULL,
  c_to varchar(20) default NULL,
  c_message varchar(150) default NULL,
  c_index int(10) NOT NULL auto_increment,
  c_time time default NULL,
  PRIMARY KEY  (c_index)
) TYPE=MyISAM;

--
-- Dumping data for table 'chat_main' 
--

--
-- Table structure for table 'chat_users' Comment
--

CREATE TABLE chat_users (
  u_name varchar(20) default NULL,
  u_pass varchar(6) default NULL,
  u_connected char(1) default NULL,
  u_keep char(1) default NULL,
  u_nick varchar(20) default NULL,
  u_lastmsg time default NULL,
  u_index int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (u_index)
) TYPE=MyISAM;

--
-- Dumping data for table 'chat_users'
--


--
-- Table structure for table 'chat_conf' Comment
--

CREATE TABLE chat_conf (
  c_title varchar(20) default NULL,
  c_color varchar(20) default NULL
	c_lang varchar(20) default NULL,
  c_theme varchar(20) default NULL,
) TYPE=MyISAM;

--
-- Dumping data for table 'chat_conf'
--
  • Comment: chat_main


  • This table contains all the main informations about the messages sent to the server.
    FROM, TO and MESSAGE have to be sent by the client.
    c_from
    the user which is sending the message
    c_to
    can be "all" if the message is public, or it can contain a nickname if the message is private
    c_message
    contains the real message
    c_index
    Index column
    c_time
    a column in which store the time of the message. To keep the database small, TIME is used to delete the messages older than five minutes.