pip

Plain text code posted by test
created at 15 Dec 06:17, updated at 15 Dec 15:16

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    ->from('Auto4Cars_AutoPriceStatisticDBO s')
            ->innerJoin('s.Passport_CurrenciesRateDBO cr WITH cr.toCurrency = 1')
//            ->addWhere('s.created_at > (NOW() - INTERVAL 12 MONTH)')
            ->groupBy('DATE(s.created_at)')
            ->orderBy('s.created_at DESC')
            ->limit('1000');

        if ($params['marka_id'] && $params['model_id']) {
            $qs->andWhere('s.marka_id = ?', $params['marka_id'])
                ->andWhere('s.model_id = ?', $params['model_id']);
        }

        if ($params['complete_id']) {
            $qs->andWhere('s.complete_id = ?', $params['complete_id']);
        }

        if ($params['autosalon_id']) {
694 Bytes in 3 ms with coderay