42S22 (1054)!

Fuel\Core\Database_Exception [ 42S22 (1054) ]:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Year("t0.created_at")' in 'where clause' with query: "SELECT COUNT(DISTINCT `t0`.`id`) AS count_result FROM `interview` AS `t0` LEFT JOIN `small_category` AS `t1_through` ON (`t0`.`small_category_id` = `t1_through`.`id`) LEFT JOIN `large_category` AS `t1` ON (`t1_through`.`large_category_id` = `t1`.`id`) WHERE `Year("t0`.`created_at")` = '2017' AND (`Month("t0`.`created_at")` = '9' AND `t0`.`display_flag` = '0' AND `t1`.`display_flag` = '0' AND `t1_through`.`display_flag` = '0') ORDER BY `t0`.`created_at` DESC, `t0`.`id` DESC"

COREPATH/classes/database/pdo/connection.php @ line 223

218                        else
219                        {
220                            $error_code 0;
221                        }
222
223                        throw new \Database_Exception($e->getMessage().' with query: "'.$sql.'"'$e->getCode(), $e$error_code);
224                    }
225                }
226
227                // no more attempts left, bail out
228                else

Backtrace

  1. COREPATH/classes/database/query.php @ line 313
    308            catch (\CacheNotFoundException $e) {}
    309        }
    310
    311        // Execute the query
    312        \DB::$query_count++;
    313        $result $db->query($this->_type$sql$this->_as_object);
    314
    315        // Cache the result if needed
    316        if (isset($cache) and ($this->_cache_all or $result->count()))
    317        {
    318            $cache->set_expiration($this->_lifetime)->set_contents($result->as_array())->set();
    
  2. PKGPATH/orm/classes/query.php @ line 1676
    1671        // Set from view or table
    1672        $query->from(array($this->_table(), $this->alias));
    1673
    1674        $tmp   $this->build_query($query$columns'count');
    1675        $query $tmp['query'];
    1676        $count $query->execute($this->connection)->get('count_result');
    1677
    1678        // Database_Result::get('count_result') returns a string | null
    1679        if ($count === null)
    1680        {
    1681            return false;
    
  3. APPPATH/classes/model/interview.php @ line 365
    360            ->and_where_close()
    361            ->order_by("created_at""desc")
    362            ->order_by("id""desc");
    363
    364        $disp 10;
    365        $total $orm->count();
    366        $pager = new Pager($total'/aladdin/interview/month/'.$yearmonth$disp);
    367        $orm->rows_limit($disp)->rows_offset($pager->getOffset());
    368        $ret $orm->get();
    369
    370        $for_pankuzu1 $year;
    
  4. APPPATH/classes/controller/frontend/interview.php @ line 205
    200    {
    201        Session::set('side''period');
    202
    203        $month $this->param("month");
    204
    205        $interview_array Model_Interview::getMonthData($month);
    206        
    207        $this->_title $interview_array[2] . " | シェアハウス経営ならオークハウス";
    208        
    209        // meta
    210        $this->_pankuzu = array(
    
  5. COREPATH/classes/request.php @ line 483
    478                    // fire any controller started events
    479                    \Event::instance()->has_events('controller_started') and \Event::instance()->trigger('controller_started''''none');
    480
    481                    $class->hasMethod('before') and $class->getMethod('before')->invoke($this->controller_instance);
    482
    483                    $response $action->invokeArgs($this->controller_instance$this->method_params);
    484
    485                    $class->hasMethod('after') and $response $class->getMethod('after')->invoke($this->controller_instance$response);
    486
    487                    // fire any controller finished events
    488                    \Event::instance()->has_events('controller_finished') and \Event::instance()->trigger('controller_finished''''none');
    
  6. DOCROOT/index.php @ line 81
    76myRedirect::do_redirect();
    77
    78// Generate the request, execute it and send the output.
    79try
    80{
    81    $response Request::forge()->execute()->response();
    82}
    83catch (HttpNotFoundException $e)
    84{
    85    \Request::reset_request(true);
    86