Commit 641878e6 by Phạm Văn Đoan

fixbug export

parent d5e4cad5
......@@ -267,7 +267,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 (date('W') >= 14 && date('Y' >= 2020)) {
if ($week >= 14 && $year >= 2020) {
$this->db->from('report_views_weekly_new');
} else {
$this->db->from('report_views_weekly');
......@@ -296,7 +296,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 (date('m') >= 4 && date('Y' >= 2020)) {
if ($month >= 4 && $year >= 2020) {
$this->db->from('report_views_monthly_new');
} else {
$this->db->from('reports_views_monthly');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment