Location: PHPKode > projects > Shell Providers Customer/Accounts DB > shelldb/dbtools/shelldb.php
CREATE TABLE customers (
			cust_id int(5) NOT NULL auto_increment,
			cust_name char(32) NOT NULL,
			cust_phone char(15), 
			cust_email char(255) NOT NULL,
			cust_addr char(255) NOT NULL,
			cust_country char(3) NOT NULL,
			member_id int(5) NOT NULL,
			PRIMARY KEY (cust_id)
			);

CREATE TABLE accounts (
			acc_id int(5) NOT NULL auto_increment,
			acc_type char(30) NOT NULL,
			acc_quota int(5) NOT NULL,
			acc_process int(5) NOT NULL,
			acc_machine char(30) NOT NULL,
			acc_login char(255) NOT NULL,
			cust_id int(5) NOT NULL,
			PRIMARY KEY (acc_id)
			);

CREATE TABLE ports    (	
			port_id int(5) NOT NULL auto_increment,
			port_num int(5) NOT NULL,
			acc_id int(5) NOT NULL,
			PRIMARY KEY (port_id)
			);

CREATE TABLE ip       ( 
			ip_id int(5) NOT NULL auto_increment,
			ip_num char(15) NOT NULL ,
			acc_id int(5) NOT NULL,
			PRIMARY KEY (ip_id)
		  	);


CREATE TABLE bill     ( 
			bill_id int(5) 	NOT NULL auto_increment,
			bill_date date NOT NULL,
			bill_amount decimal(3,2) NOT NULL,
			bill_currency char(15) NOT NULL,
			bill_paid enum("no", "yes"),
			acc_id int(5) NOT NULL,
			PRIMARY KEY (bill_id)
			);
			
CREATE TABLE login (
			username char(15) NOT NULL,
			password char(15) NOT NULL,
			isadmin  char(3)  NOT NULL,
			primary key (username)
			);

CREATE TABLE bind_ip (
			bind_ip_id  int(5) NOT NULL auto_increment,
			bind_ip_num char(15) NOT NULL,
			machine char(30) NOT NULL,
			primary key (bind_ip_id)
			);
			
Return current item: Shell Providers Customer/Accounts DB