-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsql.sql
More file actions
25 lines (21 loc) · 714 Bytes
/
sql.sql
File metadata and controls
25 lines (21 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* NAME OF THE DATABASE IS commentsection with these 3 tables */
CREATE TABLE comments(
cid int(11) not null AUTO_INCREMENT PRIMARY KEY,
username varchar(128) not null,
date datetime not null,
message TEXT not null
); /*stores question*/
CREATE TABLE reply(
rid int(11) not null AUTO_INCREMENT PRIMARY KEY,
cid int(11) not null,
username varchar(128) not null,
date datetime not null,
rmessage TEXT not null
);/*stores Answers*/
CREATE TABLE users(
id int(11) not null AUTO_INCREMENT PRIMARY KEY,
username varchar(128) not null,
email varchar(128) not null,
password varchar(128) not null,
status int(11) not null
); /*stores user details*/