PHP Classes

File: tables.sql

Recommend this page to a friend!
  Classes of Martin Barker   phm Instant Messenger Core   tables.sql   Download  
File: tables.sql
Role: Configuration script
Content type: text/plain
Description: the MySQL table script
Class: phm Instant Messenger Core
Manage users and friends that exchange messages
Author: By
Last change: Added image to Users Table allowing Avatar
Date: 15 years ago
Size: 930 bytes
 

Contents

Class file image Download
CREATE TABLE `users`(
    `fname` varchar(200) NOT NULL,
    `lname` varchar(200) NOT NULL,
    `username` varchar(100) NOT NULL,
    `password` varchar(250) NOT NULL,
    `nickname` varchar(250) NOT NULL,
    `image` text NULL,
    `quest` text NOT NULL,
    `answer` varchar(200) NOT NULL,
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

CREATE TABLE `msg` (
    `id` int(11) NOT NULL auto_increment,
    `from` int(11) NOT NULL,
    `msg` text NOT NULL,
    `to` int(11) NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

CREATE TABLE `online` (
    `user` int(11) NOT NULL,
    `time` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

CREATE TABLE `freinds` (
    `id` int(11) NOT NULL auto_increment,
    `invite` int(11) NOT NULL,
    `invited` int(11) NOT NULL,
    `allowed` int(1) NOT NULL
    PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;