Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
吴贤德
SooonerHotel
Commits
d1797199
Commit
d1797199
authored
Jul 16, 2019
by
吴贤德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
播放日志分表
parent
1520bfd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
CenterAction.class.php
SooonerHotel/App/Lib/Action/Api/CenterAction.class.php
+23
-1
No files found.
SooonerHotel/App/Lib/Action/Api/CenterAction.class.php
View file @
d1797199
...
@@ -297,9 +297,31 @@ class CenterAction extends Action
...
@@ -297,9 +297,31 @@ class CenterAction extends Action
public
function
tb_playlog_create
(){
//参数
$curMonth
=
date
(
"Ym"
);
$nextMonth
=
date
(
"Ym"
,
strtotime
(
"+1 month"
));
//创建表
$srcTable
=
"sh_log_play"
;
$curMonthTable
=
$srcTable
.
"_"
.
$curMonth
;
$nextMonthTable
=
$srcTable
.
"_"
.
$nextMonth
;
$this
->
createTable
(
$srcTable
,
$curMonthTable
);
$this
->
createTable
(
$srcTable
,
$nextMonthTable
);
}
//------ 表创建方法 ------
function
createTable
(
$srcTable
,
$targetTable
){
echo
$srcTable
.
"->"
.
$targetTable
;
$qsql
=
"SELECT table_name FROM information_schema.TABLES WHERE table_name = '
$targetTable
';"
;
$arrTables
=
D
(
""
)
->
query
(
$qsql
);
if
(
count
(
$arrTables
)
<=
0
){
$csql
=
"CREATE TABLE
$targetTable
LIKE
$srcTable
;"
;
D
(
""
)
->
execute
(
$csql
);
}
}
function
HttpPost
(
$url
,
$param
){
function
HttpPost
(
$url
,
$param
){
$ch
=
curl_init
();
$ch
=
curl_init
();
...
...
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