1.
CREATE TABLE costlist(
id int not null auto_increment primary key,
inputtime TIMESTAMP,
name varchar( 6 ) ,
sum DECIMAL( 4, 1 ) default '0' ,
cost DECIMAL(4,1) default '0',
balance DECIMAL( 4, 1 ) default '0',
information TEXT,
flag varchar(1)
)
2.
create table user(
id smallint auto_increment primary key not null,
imei varchar(40),
stone_win tinyint default 0,
stone_los tinyint default 0,
scissor_win tinyint default 0,
scissor_los tinyint default 0,
cloth_win tinyint default 0,
cloth_los tinyint default 0,
login_state varchar(1) default '0',
fight_state varchar(1) default '0',
user_group int
)
3.
create table friends(
user_id smallint,
friends_id smallint,
foreign key(user_id) references user(id),
foreign key(friends_id) references user(id)
)