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
c08c0072
Commit
c08c0072
authored
Nov 21, 2019
by
jackzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ee765070
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
carton.php
leankcanary/carton.php
+17
-2
cartonList.php
leankcanary/cartonList.php
+1
-0
No files found.
leankcanary/carton.php
View file @
c08c0072
...
...
@@ -16,8 +16,23 @@ $isHandle = $_GET['isHandle'];
$gitCommitHash
=
$_GET
[
'gitCommitHash'
];
$gitCurrentBranch
=
$_GET
[
'gitCurrentBranch'
];
$addtime
=
$_GET
[
'addtime'
];
// 插入数据
mysqli_query
(
$link
,
"INSERT INTO carton (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 carton 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 carton (className,contentJson,modulePackage,isHandle,gitCommitHash,gitCurrentBranch,addtime) VALUES ('
$className
','
$contentJson
','
$modulePackage
','
$isHandle
','
$gitCommitHash
','
$gitCurrentBranch
','
$addtime
')"
)
or
die
(
'添加数据出错:'
.
mysqli_error
());
}
$result
=
array
(
'code'
=>
0
,
...
...
leankcanary/cartonList.php
View file @
c08c0072
...
...
@@ -98,6 +98,7 @@
for
(
$i
=
0
;
$i
<
$newsNum
;
$i
++
){
$row
=
mysqli_fetch_assoc
(
$result
);
echo
"<tr>"
;
echo
"<div>编号:
{
$row
[
'id'
]
}
</div>"
;
echo
"
<div class=
\"
col-padding animate-box
\"
data-animate-effect=
\"
fadeInLeft
\"
>
...
...
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