Demo entry 6357886

sql

   

Submitted by anonymous on Apr 24, 2017 at 07:10
Language: MySQL. Code size: 842 Bytes.

create table user
	(id varchar(20),
    password varchar(100) not null,
    name varchar(50) not null,
    email varchar(320) not null,
    date datetime not null,
    primary key(id),
    unique(email));

create table lost_item
	(id int not null auto_increment,
    sender_id varchar(20) not null,
    head varchar(255) not null,
    body text not null,
    image_url varchar(20),
    date datetime not null,
    receiver_id varchar(20),
    primary key(id),
    foreign key(sender_id) references user(id));

create table found_item
	(id int not null auto_increment,
    sender_id varchar(20) not null,
    head varchar(255) not null,
    body text not null,
    image_url varchar(20),
    date datetime not null,
    receiver_id varchar(20),
    primary key(id),
    foreign key(sender_id) references user(id));

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).