Error:

Error code: 0
Source file: /var/www/vhosts/archiveadme.com/httpdocs/system/classes/database.php (34):
Error message: Invalid query: Unknown column '2020' in 'field list'
SQL Query:
 
            SELECT `2020`, `2019`, `2018`, `2017`, `2016`, `2015`, `2014`, `2013`, `2012`, `2011`, `2010`, `2009`, `2008`, `2007`, `2006`, `2005`, `2004`, `2003`, `2002`, `2001`, `2000`, `1999`, `1998`, `1997`, `1996`, `1995`, `1994`, `1993`, `1992`, `1991`
            FROM `festivals_years`  
            WHERE `festival_id` = '76' 
 
  1. }
  2. /**
  3.  *
  4.  */
  5. public static function query($query){
  6. self::$last_query = $query;
  7. //fb::log($query);
  8. $result = mysql_query($query, self::$link);
  9. if (!$result) {
  10. throw new Exception ('Invalid query: ' . mysql_error());
  11. }
  12. self::$query_result = $result;
  13. // $log = logs::factory('mysql_query');
  14. // $log->setDir('/logs/');
  15. // $log->write($query);
  16. return $result;
  17. }
  18. /**
  19.  * TODO
  20.  * нужно переделать если один результат, то елемент массива 0 только возвращать в сокращенном виде
  21.  
Stack trace:
#0 /var/www/vhosts/archiveadme.com/httpdocs/application/classes/festivals.php(224): Database::query('\n            SE...')
#1 /var/www/vhosts/archiveadme.com/httpdocs/application/modules/festivals/frontend/festival.php(367): festivals::getYears('76')
#2 /var/www/vhosts/archiveadme.com/httpdocs/application/modules/festivals/ini.php(20): include_once('/var/www/vhosts...')
#3 /var/www/vhosts/archiveadme.com/httpdocs/system/classes/core.php(59): require_once('/var/www/vhosts...')
#4 /var/www/vhosts/archiveadme.com/httpdocs/index.php(12): core::loadModule('festivals')
#5 {main}

Dumps:

$_GET:
array (
  'festivals/goldendrum/2016/' => '',
)
$_POST:
array (
)
$_SESSION:
$_SERVER:
array (
  'PATH' => '/sbin:/usr/sbin:/bin:/usr/bin',
  'PP_CUSTOM_PHP_INI' => '/var/www/vhosts/system/archiveadme.com/etc/php.ini',
  'PP_CUSTOM_PHP_CGI_INDEX' => 'fastcgi',
  'SCRIPT_NAME' => '/index.php',
  'REQUEST_URI' => '/festivals/goldendrum/2016/',
  'QUERY_STRING' => 'festivals/goldendrum/2016/',
  'REQUEST_METHOD' => 'GET',
  'SERVER_PROTOCOL' => 'HTTP/1.0',
  'GATEWAY_INTERFACE' => 'CGI/1.1',
  'REDIRECT_URL' => '/festivals/goldendrum/2016/',
  'REDIRECT_QUERY_STRING' => 'festivals/goldendrum/2016/',
  'REMOTE_PORT' => '57263',
  'SCRIPT_FILENAME' => '/var/www/vhosts/archiveadme.com/httpdocs/index.php',
  'SERVER_ADMIN' => 'oleg@boliuk.com',
  'DOCUMENT_ROOT' => '/var/www/vhosts/archiveadme.com/httpdocs',
  'REMOTE_ADDR' => '35.172.233.215',
  'SERVER_PORT' => '80',
  'SERVER_ADDR' => '176.9.138.202',
  'SERVER_NAME' => 'archiveadme.com',
  'SERVER_SOFTWARE' => 'Apache',
  'SERVER_SIGNATURE' => '
Apache Server at archiveadme.com Port 80
', 'HTTP_ACCEPT_ENCODING' => 'br,gzip', 'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.5', 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_USER_AGENT' => 'CCBot/2.0 (https://commoncrawl.org/faq/)', 'HTTP_CONNECTION' => 'close', 'HTTP_X_ACCEL_INTERNAL' => '/internal-nginx-static-location', 'HTTP_X_FORWARDED_FOR' => '35.172.233.215', 'HTTP_X_REAL_IP' => '35.172.233.215', 'HTTP_HOST' => 'archiveadme.com', 'SCRIPT_URI' => 'http://archiveadme.com/festivals/goldendrum/2016/', 'SCRIPT_URL' => '/festivals/goldendrum/2016/', 'REDIRECT_STATUS' => '200', 'REDIRECT_SCRIPT_URI' => 'http://archiveadme.com/festivals/goldendrum/2016/', 'REDIRECT_SCRIPT_URL' => '/festivals/goldendrum/2016/', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1596989703.09482097625732421875, 'REQUEST_TIME' => 1596989703, )