-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstarttable.py
More file actions
104 lines (104 loc) · 4.54 KB
/
starttable.py
File metadata and controls
104 lines (104 loc) · 4.54 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import MySQLdb
db=MySQLdb.connect("localhost","root","plutonian","test1")
cursor=db.cursor()
cmd="""drop table if exists undergradresults"""
cursor.execute(cmd)
cmd="""drop table if exists postgradresults"""
cursor.execute(cmd)
cmd="""drop table if exists undergradcounters"""
cursor.execute(cmd)
cmd="""drop table if exists postgradcounters"""
cursor.execute(cmd)
cmd="""drop table if exists api_mphilresults"""
cursor.execute(cmd)
cmd="""drop table if exists api_mphilcounters"""
cursor.execute(cmd)
cmd="""drop table if exists ncwebresults"""
cursor.execute(cmd)
cmd="""drop table if exists ncwebcounters"""
cursor.execute(cmd)
cmd="""drop table if exists phdcounters"""
cursor.execute(cmd)
cmd="""drop table if exists phdresults"""
cursor.execute(cmd)
cmd="""drop table if exists api_diplomacounters"""
cursor.execute(cmd)
cmd="""drop table if exists api_diplomaresults"""
cursor.execute(cmd)
cmd="""drop table if exists srcccounters"""
cursor.execute(cmd)
cmd="""drop table if exists hansrajcounters"""
cursor.execute(cmd)
cmd="""drop table if exists srccnotices"""
cursor.execute(cmd)
cmd="""drop table if exists hansrajnotices"""
cursor.execute(cmd)
cmd="""drop table if exists south_campusresults"""
cursor.execute(cmd)
cmd="""drop table if exists south_campuscounters"""
cursor.execute(cmd)
cmd="""drop table if exists api_datesheetugresults"""
cursor.execute(cmd)
cmd="""drop table if exists api_datesheetugcounters"""
cursor.execute(cmd)
cmd="""create table undergradresults(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""create table postgradresults(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""create table postgradcounters(postgradid int,postgradtitle char(255))"""
cursor.execute(cmd)
cmd="""create table undergradcounters(undergradid int,undergradtitle char(255))"""
cursor.execute(cmd)
cmd="""insert into undergradcounters(undergradid,undergradtitle) values(1,"last")"""
cursor.execute(cmd)
cmd="""insert into postgradcounters(postgradid,postgradtitle) values(1,"last")"""
cursor.execute(cmd)
cmd="""create table api_mphilresults(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""create table api_mphilcounters(mphilid int,mphiltitle char(255))"""
cursor.execute(cmd)
cmd="""create table phdresults(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""create table phdcounters(phdid int,phdtitle char(255))"""
cursor.execute(cmd)
cmd="""create table api_diplomaresults(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""create table api_diplomacounters(diplomaid int,diplomatitle char(255))"""
cursor.execute(cmd)
cmd="""create table ncwebresults(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""create table ncwebcounters(ncwebid int,ncwebtitle char(255))"""
cursor.execute(cmd)
cmd="""create table srccnotices(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""create table srcccounters(srccid int,srcctitle char(255))"""
cursor.execute(cmd)
cmd="""create table hansrajnotices(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""create table hansrajcounters(hansrajid int,hansrajtitle char(255))"""
cursor.execute(cmd)
cmd="""create table south_campuscounters(south_campusid int,south_campustitle char(255))"""
cursor.execute(cmd)
cmd="""create table south_campusresults(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""insert into south_campuscounters values(1,"last")"""
cursor.execute(cmd)
cmd="""insert into srcccounters values(1,"last")"""
cursor.execute(cmd)
cmd="""insert into hansrajcounters values(1,"last")"""
cursor.execute(cmd)
cmd="""insert into api_mphilcounters values(1,"last")"""
cursor.execute(cmd)
cmd="""insert into diplomacounters values(1,"last")"""
cursor.execute(cmd)
cmd="""insert into ncwebcounters values(1,"last")"""
cursor.execute(cmd)
cmd="""create table api_datesheetugcounters(datesheetid int,datesheettitle char(255))"""
cursor.execute(cmd)
cmd="""create table api_datesheetugresults(id int primary key auto_increment,title char(255) not null,linkf char(255) not null)"""
cursor.execute(cmd)
cmd="""insert into api_datesheetugcounters values(1,"last")"""
cursor.execute(cmd)
db.commit()
cursor.close()
db.close()