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
ee765070
Commit
ee765070
authored
Nov 20, 2019
by
jackzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
0bb64148
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
2 deletions
+33
-2
carton.php
leankcanary/carton.php
+31
-0
cartonDetails.php
leankcanary/cartonDetails.php
+1
-1
cartonList.php
leankcanary/cartonList.php
+1
-1
No files found.
leankcanary/carton.php
0 → 100644
View file @
ee765070
<?php
// 处理增加操作的页面
require
"dbconfig.php"
;
// 连接mysql
$link
=
@
mysqli_connect
(
HOST
,
USER
,
PASS
,
DBNAME
)
or
die
(
"提示:数据库连接失败!"
);
// 选择数据库
mysqli_select_db
(
$link
,
DBNAME
);
// 编码设置
mysqli_set_charset
(
$link
,
'utf8'
);
// 获取增加的新闻
$className
=
$_GET
[
'className'
];
$contentJson
=
$_GET
[
'contentJson'
];
$modulePackage
=
$_GET
[
'modulePackage'
];
$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
());
$result
=
array
(
'code'
=>
0
,
'message'
=>
数据更新成功
,
'data'
=>
null
);
exit
(
json_encode
(
$result
));
//返回0表示注册成功
leankcanary/cartonDetails.php
View file @
ee765070
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
$id
=
$_GET
[
'id'
];
$id
=
$_GET
[
'id'
];
// 3. 从DBNAME中查询到news数据库,返回数据库结果集,并按照addtime降序排列
// 3. 从DBNAME中查询到news数据库,返回数据库结果集,并按照addtime降序排列
$sql
=
"select * from
leakCanary
where id=
{
$id
}
order by id asc;"
;
$sql
=
"select * from
carton
where id=
{
$id
}
order by id asc;"
;
// 结果集
// 结果集
$result
=
mysqli_query
(
$link
,
$sql
)
or
die
(
'添加数据出错:'
.
mysqli_error
());
$result
=
mysqli_query
(
$link
,
$sql
)
or
die
(
'添加数据出错:'
.
mysqli_error
());
...
...
leankcanary/cartonList.php
View file @
ee765070
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
mysqli_set_charset
(
$link
,
'utf8'
);
mysqli_set_charset
(
$link
,
'utf8'
);
// 3. 从DBNAME中查询到news数据库,返回数据库结果集,并按照addtime降序排列
// 3. 从DBNAME中查询到news数据库,返回数据库结果集,并按照addtime降序排列
$sql
=
'select * from
leakCanary
order by id desc;'
;
$sql
=
'select * from
carton
order by id desc;'
;
// 结果集
// 结果集
$result
=
mysqli_query
(
$link
,
$sql
)
or
die
(
'添加数据出错:'
.
mysqli_error
());
$result
=
mysqli_query
(
$link
,
$sql
)
or
die
(
'添加数据出错:'
.
mysqli_error
());
...
...
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