Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
app-stable-website
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Android
app-stable-website
Commits
bcaa09a9
Commit
bcaa09a9
authored
Nov 21, 2019
by
jackzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据字段
parent
111aa20f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
cartonList.php
leankcanary/cartonList.php
+0
-2
leakcanary.php
leankcanary/leakcanary.php
+17
-2
news.sql
leankcanary/news.sql
+2
-2
No files found.
leankcanary/cartonList.php
View file @
bcaa09a9
...
@@ -113,8 +113,6 @@
...
@@ -113,8 +113,6 @@
<div
class=
"fh5co-narrow-content"
>
<div
class=
"fh5co-narrow-content"
>
<h1
class=
"fh5co-heading animate-box"
data-animate-effect=
"fadeInLeft"
>
卡顿日志输出
</h1>
<h1
class=
"fh5co-heading animate-box"
data-animate-effect=
"fadeInLeft"
>
卡顿日志输出
</h1>
<div
class=
"row row-bottom-padded-md"
>
<div
class=
"row row-bottom-padded-md"
>
<?php
<?php
// 处理增加操作的页面
// 处理增加操作的页面
...
...
leankcanary/leakcanary.php
View file @
bcaa09a9
...
@@ -16,8 +16,23 @@ $isHandle = $_GET['isHandle'];
...
@@ -16,8 +16,23 @@ $isHandle = $_GET['isHandle'];
$gitCommitHash
=
$_GET
[
'gitCommitHash'
];
$gitCommitHash
=
$_GET
[
'gitCommitHash'
];
$gitCurrentBranch
=
$_GET
[
'gitCurrentBranch'
];
$gitCurrentBranch
=
$_GET
[
'gitCurrentBranch'
];
$addtime
=
$_GET
[
'addtime'
];
$addtime
=
$_GET
[
'addtime'
];
// 插入数据
mysqli_query
(
$link
,
"INSERT INTO leakCanary (className,contentJson,modulePackage,isHandle,gitCommitHash,gitCurrentBranch,addtime) VALUES ('
$className
','
$contentJson
','
$modulePackage
','
$isHandle
','
$gitCommitHash
','
$gitCurrentBranch
','
$addtime
')"
)
or
die
(
'添加数据出错:'
.
mysqli_error
());
// 3. 从DBNAME中查询到news数据库,返回数据库结果集,并按照addtime降序排列
$sql
=
'select className from leakCanary order by id desc;'
;
// 结果集
$result
=
mysqli_query
(
$link
,
$sql
)
or
die
(
'添加数据出错:'
.
mysqli_error
());
$newsNum
=
mysqli_num_rows
(
$result
);
$hasTitle
=
false
;
for
(
$i
=
0
;
$i
<
$newsNum
;
$i
++
){
$row
=
mysqli_fetch_assoc
(
$result
);
if
(
$row
[
'className'
]
===
$className
)
{
$hasTitle
=
true
;
}
}
if
(
$hasTitle
==
false
){
// 插入数据
mysqli_query
(
$link
,
"INSERT INTO leakCanary (className,contentJson,modulePackage,isHandle,gitCommitHash,gitCurrentBranch,addtime) VALUES ('
$className
','
$contentJson
','
$modulePackage
','
$isHandle
','
$gitCommitHash
','
$gitCurrentBranch
','
$addtime
')"
)
or
die
(
'添加数据出错:'
.
mysqli_error
());
}
$result
=
array
(
$result
=
array
(
'code'
=>
0
,
'code'
=>
0
,
...
...
leankcanary/news.sql
View file @
bcaa09a9
...
@@ -27,7 +27,7 @@ CREATE TABLE `leakCanary` (
...
@@ -27,7 +27,7 @@ CREATE TABLE `leakCanary` (
`isHandle`
varchar
(
64
)
NOT
NULL
,
`isHandle`
varchar
(
64
)
NOT
NULL
,
`gitCommitHash`
text
NOT
NULL
,
`gitCommitHash`
text
NOT
NULL
,
`gitCurrentBranch`
text
NOT
NULL
,
`gitCurrentBranch`
text
NOT
NULL
,
`addtime`
date
NOT
NULL
,
`addtime`
date
time
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
AUTO_INCREMENT
=
1
;
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
AUTO_INCREMENT
=
1
;
...
@@ -39,7 +39,7 @@ CREATE TABLE `carton` (
...
@@ -39,7 +39,7 @@ CREATE TABLE `carton` (
`isHandle`
varchar
(
64
)
NOT
NULL
,
`isHandle`
varchar
(
64
)
NOT
NULL
,
`gitCommitHash`
text
NOT
NULL
,
`gitCommitHash`
text
NOT
NULL
,
`gitCurrentBranch`
text
NOT
NULL
,
`gitCurrentBranch`
text
NOT
NULL
,
`addtime`
date
NOT
NULL
,
`addtime`
date
time
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
AUTO_INCREMENT
=
1
;
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
AUTO_INCREMENT
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment