
怎样使用其它语言插入数据
@ego008 想用php,或Python插入数据。。。但是看代码好久都没有思路,是下面的代码吗?能否提供一下代码演示,PHP,Python都可以。。。
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
type Article struct {
Id uint64 `json:"id"`
Uid uint64 `json:"uid"`
Cid uint64 `json:"cid"`
RUid uint64 `json:"ruid"`
Title string `json:"title"`
Content string `json:"content"`
ClientIp string `json:"clientip"`
Tags string `json:"tags"`
AddTime uint64 `json:"addtime"`
EditTime uint64 `json:"edittime"`
Comments uint64 `json:"comments"`
CloseComment bool `json:"closecomment"`
Hidden bool `json:"hidden"`
}
type ArticleMini struct {
Id uint64 `json:"id"`
Uid uint64 `json:"uid"`
Cid uint64 `json:"cid"`
Ruid uint64 `json:"ruid"`
Title string `json:"title"`
EditTime uint64 `json:"edittime"`
Comments uint64 `json:"comments"`
Hidden bool `json:"hidden"`
}
type ArticleListItem struct {
Id uint64 `json:"id"`
Uid uint64 `json:"uid"`
Name string `json:"name"`
Avatar string `json:"avatar"`
Cid uint64 `json:"cid"`
Cname string `json:"cname"`
Ruid uint64 `json:"ruid"`
Rname string `json:"rname"`
Title string `json:"title"`
EditTime uint64 `json:"edittime"`
EditTimeFmt string `json:"edittimefmt"`
Comments uint64 `json:"comments"`
}
type ArticlePageInfo struct {
Items []ArticleListItem `json:"items"`
HasPrev bool `json:"hasprev"`
HasNext bool `json:"hasnext"`
FirstKey uint64 `json:"firstkey"`
FirstScore uint64 `json:"firstscore"`
LastKey uint64 `json:"lastkey"`
LastScore uint64 `json:"lastscore"`
}
type ArticleLi struct {
Id uint64 `json:"id"`
Title string `json:"title"`
Tags string `json:"tags"`
}
type ArticleRelative struct {
Articles []ArticleLi
Tags []string
}
type ArticleFeedListItem struct {
Id uint64
Uid uint64
Name string
Cname string
Title string
AddTimeFmt string
EditTimeFmt string
Des string
}
共3条关于"怎样使用其它语言插入数据"的评论
不能直接连接数据库,只能通过写接口让其它语言调用。
@youbbs 也就是说只能通过借口写入?
@root 是的。数据库是嵌入式,单实例占用连接。