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
d5e4cad5
Commit
d5e4cad5
authored
Apr 06, 2020
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug export
parent
5085fd4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
Track_model.php
application/models/Track_model.php
+12
-0
No files found.
application/models/Track_model.php
View file @
d5e4cad5
...
@@ -266,7 +266,13 @@ class Track_model extends CI_Model
...
@@ -266,7 +266,13 @@ class Track_model extends CI_Model
{
{
//$sql = "SELECT * FROM report_views_weekly WHERE `week` = ? AND `year` = ? ORDER BY total_point DESC LIMIT {$offset}, {$limit} ";
//$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);
//$query = $this->db->query($sql, $week, $year);
if
(
date
(
'W'
)
>=
14
&&
date
(
'Y'
>=
2020
))
{
$this
->
db
->
from
(
'report_views_weekly_new'
);
}
else
{
$this
->
db
->
from
(
'report_views_weekly'
);
$this
->
db
->
from
(
'report_views_weekly'
);
}
$this
->
db
->
where
(
'week ='
,
$week
);
$this
->
db
->
where
(
'week ='
,
$week
);
$this
->
db
->
where
(
'year ='
,
$year
);
$this
->
db
->
where
(
'year ='
,
$year
);
$this
->
db
->
limit
(
$limit
,
$offset
);
$this
->
db
->
limit
(
$limit
,
$offset
);
...
@@ -289,7 +295,13 @@ class Track_model extends CI_Model
...
@@ -289,7 +295,13 @@ class Track_model extends CI_Model
{
{
//$sql = "SELECT * FROM reports_views_monthly WHERE `month` = ? AND `year` = ? ORDER BY total_point DESC LIMIT {$offset}, {$limit} ";
//$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);
//$query = $this->db->query($sql, $month, $year);
if
(
date
(
'm'
)
>=
4
&&
date
(
'Y'
>=
2020
))
{
$this
->
db
->
from
(
'report_views_monthly_new'
);
}
else
{
$this
->
db
->
from
(
'reports_views_monthly'
);
$this
->
db
->
from
(
'reports_views_monthly'
);
}
$this
->
db
->
where
(
'month ='
,
$month
);
$this
->
db
->
where
(
'month ='
,
$month
);
$this
->
db
->
where
(
'year ='
,
$year
);
$this
->
db
->
where
(
'year ='
,
$year
);
$this
->
db
->
limit
(
$limit
,
$offset
);
$this
->
db
->
limit
(
$limit
,
$offset
);
...
...
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