Commit 9cf9b8b0 by san58

Поправил вычисление даты CSV

1 parent 1de28f6a
...@@ -68,6 +68,7 @@ class SiteController extends Controller ...@@ -68,6 +68,7 @@ class SiteController extends Controller
//var_dump(Yii::$app->user->isGuest); //var_dump(Yii::$app->user->isGuest);
//var_dump(Yii::$app->user->identity); //var_dump(Yii::$app->user->identity);
$statistics = ['csv_date' => '', 'whois_status'=>[], 'itx_status'=>[], 'domain_count'=>0, 'domain_filtred'=>0, 'domain_whois'=>0, 'domain_tix'=>0]; $statistics = ['csv_date' => '', 'whois_status'=>[], 'itx_status'=>[], 'domain_count'=>0, 'domain_filtred'=>0, 'domain_whois'=>0, 'domain_tix'=>0];
$statistics['whois_status'] = (new yii\db\Query()) $statistics['whois_status'] = (new yii\db\Query())
->select(['COUNT(*) AS cnt', 'wis_status', 'status']) ->select(['COUNT(*) AS cnt', 'wis_status', 'status'])
->from('{{%host}}') ->from('{{%host}}')
...@@ -91,7 +92,7 @@ class SiteController extends Controller ...@@ -91,7 +92,7 @@ class SiteController extends Controller
->groupBy(['tix_status', 'status']) ->groupBy(['tix_status', 'status'])
->all(); ->all();
$csv = Host::find()->select(['csv_date'])->orderBy('csv_date ASC')->one(); $csv = Host::find()->select(['csv_date'])->orderBy('csv_date DESC')->one();
if ($csv) if ($csv)
$statistics['csv_date'] = $csv['csv_date']; $statistics['csv_date'] = $csv['csv_date'];
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!