Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vmusicchart-cms
Overview
Overview
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
Phạm Văn Đoan
vmusicchart-cms
Commits
42b6fd72
Commit
42b6fd72
authored
Jan 11, 2021
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix lỗi ko xuất báo cáo tuần do có cả data hệ thống cũ
parent
efd0304d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
Track_model.php
application/models/Track_model.php
+4
-11
No files found.
application/models/Track_model.php
View file @
42b6fd72
...
...
@@ -6,6 +6,8 @@ class Track_model extends CI_Model
protected
$_table_user
=
'users'
;
protected
$_table_track_user
=
'track_user'
;
protected
$_table_track_artists
=
'track_artists'
;
protected
$_table_report_views_weekly
=
'report_views_weekly_new'
;
protected
$_table_report_views_monthly
=
'report_views_monthly_new'
;
public
function
__construct
()
{
...
...
@@ -507,12 +509,7 @@ class Track_model extends CI_Model
//$sql = "SELECT * FROM report_views_weekly WHERE `week` = ? AND `year` = ? ORDER BY total_point DESC LIMIT {$offset}, {$limit} ";
//$query = $this->db->query($sql, $week, $year);
if
(
$week
>=
14
&&
$year
>=
2020
)
{
$this
->
db
->
from
(
'report_views_weekly_new'
);
}
else
{
$this
->
db
->
from
(
'report_views_weekly'
);
}
$this
->
db
->
from
(
$this
->
_table_report_views_weekly
);
$this
->
db
->
where
(
'week ='
,
$week
);
$this
->
db
->
where
(
'year ='
,
$year
);
$this
->
db
->
limit
(
$limit
,
$offset
);
...
...
@@ -536,11 +533,7 @@ class Track_model extends CI_Model
//$sql = "SELECT * FROM reports_views_monthly WHERE `month` = ? AND `year` = ? ORDER BY total_point DESC LIMIT {$offset}, {$limit} ";
//$query = $this->db->query($sql, $month, $year);
if
(
$month
>=
4
&&
$year
>=
2020
)
{
$this
->
db
->
from
(
'report_views_monthly_new'
);
}
else
{
$this
->
db
->
from
(
'reports_views_monthly'
);
}
$this
->
db
->
from
(
$this
->
_table_report_views_monthly
);
$this
->
db
->
where
(
'month ='
,
$month
);
$this
->
db
->
where
(
'year ='
,
$year
);
...
...
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