-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtable.php
More file actions
42 lines (37 loc) · 1.04 KB
/
Copy pathtable.php
File metadata and controls
42 lines (37 loc) · 1.04 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// sql to create table
$sql = "CREATE TABLE StudentDB (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
gender VARCHAR(10) NOT NULL,
category VARCHAR(15) NOT NULL,
department VARCHAR(30) NOT NULL,
enrollment VARCHAR(20) NOT NULL,
email VARCHAR(50) NOT NULL,
number INT(10) UNSIGNED NOT NULL,
ctype VARCHAR(100) NOT NULL,
complaint VARCHAR(500) NOT NULL
)";
if ($conn->query($sql) === TRUE) {
} else {
echo "Error creating table: " . $conn->error;
}
// sql to create table
$sql = "CREATE TABLE FacultyDB (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
gender VARCHAR(10) NOT NULL,
category VARCHAR(15) NOT NULL,
department VARCHAR(30) NOT NULL,
empid VARCHAR(20) NOT NULL,
designation VARCHAR(20) NOT NULL,
email VARCHAR(50) NOT NULL,
number INT(10) UNSIGNED NOT NULL,
ctype VARCHAR(100) NOT NULL,
complaint VARCHAR(500) NOT NULL
)";
if ($conn->query($sql) === TRUE) {
} else {
echo "Error creating table: " . $conn->error;
}