-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
123 lines (91 loc) · 1.84 KB
/
notes.txt
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//20211201
database {
users {
userid
nickname
level
(passwd)
}
works {
workid
workname
authorid
rank
ext
}
follows {
whofollow
followwho
}
commands {
commandid
authorid
workid
}
likes {
workid
likerid
}
tags {
workid
tagname
}
}
//20211119=================================================================
images {
avatar_userid_xxxx .jpg
work_workid_xxxx .jpg|.png
avatar_default .jpg
}
texts {
command_commandid_xxxx .txt
introduction_workid_xxxx .txt
introduction_userid_xxxx .txt
}
default user {
userid: 0
nickname: hehepig
level: 0
passwd: hehe
}
index.html
注:id 位数统一规定小于9位
database {
users {
userid
nickname
level
(passwd)
}
works {
workid
workname
authorid
rank
ext
}
commands {
commandid
authorid
workid
}
likes {
workid
likerid
}
tags {
workid
tagname
}
}
//===============================================================================
// 语法
//===============================================================================
-----------------------20211119------------
可: row = db.execute("SELECT passwd FROM users WHERE userid = ?", [userid])
不可: row = db.execute("SELECT passwd FROM users WHERE userid = ?", (userid))
原因: [userid] 是一个东西,userid 是一串东西 ?
可: if session.get("userid") != None:
不可: if session["userid"] != None:
原因: 因为可能没有key userid
db = sqlite3.connect('heheblog.db', check_same_thread=False)