4 # Simplifies the task of creating all the database tables
\r
5 # used by the login system.
\r
7 # Can be run from command prompt by typing:
\r
9 # mysql -u yourusername -D yourdatabasename < dbtables.sql
\r
11 # That's with dbtables.sql in the mysql bin directory, but
\r
12 # you can just include the path to dbtables.sql and that's
\r
15 # Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
\r
16 # Last Updated: August 13, 2004
\r
20 # Table structure for users table
\r
22 DROP TABLE IF EXISTS users;
\r
24 CREATE TABLE users (
\r
25 username varchar(30) primary key,
\r
26 password varchar(32),
\r
28 userlevel tinyint(1) unsigned not null,
\r
30 timestamp int(11) unsigned not null
\r
35 # Table structure for active users table
\r
37 DROP TABLE IF EXISTS active_users;
\r
39 CREATE TABLE active_users (
\r
40 username varchar(30) primary key,
\r
41 timestamp int(11) unsigned not null
\r
46 # Table structure for active guests table
\r
48 DROP TABLE IF EXISTS active_guests;
\r
50 CREATE TABLE active_guests (
\r
51 ip varchar(15) primary key,
\r
52 timestamp int(11) unsigned not null
\r
57 # Table structure for banned users table
\r
59 DROP TABLE IF EXISTS banned_users;
\r
61 CREATE TABLE banned_users (
\r
62 username varchar(30) primary key,
\r
63 timestamp int(11) unsigned not null
\r