Maturitní ročník 2008:

DibiDriverException

DibiDriverException #1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') t' at line 13

Source file

File: /data/html/palice/www/libs/dibi/dibi.min.php   Line: 1116

Line 1109:    new
Line 1110:    DibiDriverException(mysql_error($this->connection),mysql_errno($this->connection));}}if(isset($config['sqlmode'])){$this->query("SET sql_mode='$config[sqlmode]'");}$this->query("SET time_zone='".date('P')."'");$this->buffered=empty($config['unbuffered']);}public
Line 1111:    function
Line 1112:    disconnect(){mysql_close($this->connection);}public
Line 1113:    function
Line 1114:    query($sql){if($this->buffered){$this->resultSet=@mysql_query($sql,$this->connection);}else{$this->resultSet=@mysql_unbuffered_query($sql,$this->connection);}if(mysql_errno($this->connection)){throw
Line 1115:    new
Line 1116:    DibiDriverException(mysql_error($this->connection),mysql_errno($this->connection),$sql);}return
Line 1117:    is_resource($this->resultSet)?clone$this:NULL;}public
Line 1118:    function
Line 1119:    getInfo(){$res=array();preg_match_all('#(.+?): +(\d+) *#',mysql_info($this->connection),$matches,PREG_SET_ORDER);if(preg_last_error())throw
Line 1120:    new
Line 1121:    PcreException;foreach($matches
Line 1122:    as$m){$res[$m[1]]=(int)$m[2];}return$res;}public
Line 1123:    function

Call stack

  1. dibi/dibi.min.php (263) source   DibiMySqlDriver-> query (arguments )

  2. dibi/dibi.min.php (624) source   DibiConnection-> nativeQuery (arguments )

  3. dibi/dibi.min.php (622) source   DibiDataSource-> getTotalCount ()

  4. <PHP inner-code> DibiDataSource-> count ()

  5. DataGrid/DataGrid.php (135) source   count (arguments )

  6. presenters/DefaultPresenter.php (230) source   DataGrid-> bindDataTable (arguments )

  7. Nette/loader.php (421) source   Front_DefaultPresenter-> createComponentAuthors (arguments )

  8. Nette/loader.php (412) source   ComponentContainer-> createComponent (arguments )

  9. Nette/loader.php (772) source   ComponentContainer-> getComponent (arguments )

  10. c-Nette.Template/_FrontModule.templates.Default.authors.phtml-4e6fae95f52cb6deb952f90143d1032b.php (17) source   Control-> getWidget (arguments )

  11. Nette/loader.php (4026) source   _cbb1543609183_content (arguments )

  12. c-Nette.Template/_FrontModule.templates._layout.phtml-d04ccd73e9687148d39093a2cf4e8625.php (124) source   LatteMacros:: callBlock (arguments )

  13. Nette/loader.php (323) source   include (arguments )

  14. Nette/loader.php (4153) source   LimitedScope:: load (arguments )

  15. c-Nette.Template/_FrontModule.templates.Default.authors.phtml-4e6fae95f52cb6deb952f90143d1032b.php (43) source   Template-> render ()

  16. Nette/loader.php (323) source   include (arguments )

  17. Nette/loader.php (4153) source   LimitedScope:: load (arguments )

  18. Nette/loader.php (1162) source   Template-> render ()

  19. Nette/loader.php (659) source   RenderResponse-> send ()

  20. app/bootstrap.php (79) source   Application-> run ()

  21. www/index.php (19) source   require (arguments )

SQL

SELECT COUNT(*) 
FROM (
SELECT
 authorUrl as link,
 name,
 surname, CONCAT(
 IF(r, 'R', ''),
 IF(class - 2020 < 0,
 ' ',
 CONCAT(
 IF(r, 8, 4) - class + 2020,
 '.')
 ),
 mark
 )as classMark, (
SELECT COUNT(`workId`) 
FROM `works` 
WHERE `author`=`authorId`)as `sum`, (
SELECT SUM(`read`) 
FROM `works` 
WHERE `author`=`authorId` 
GROUP BY `author`)as `read` 
FROM `authors` 
WHERE (`class` = '2008') AND ) t

Nette Application

Environment

HTTP request

HTTP response

¤ ×
¤ ×
¤ ×
¤ ×

Front:Default:authors

Parameter Value
class 2008
category
NULL
grade
NULL
type
NULL
award
NULL
year
NULL

Routers

Matched? Class Mask Defaults Request
no Route admin/<presenter>-<action> module = Admin
presenter = Default
action = default
no Route <presenter autor|prace>/<url> module = Front
action = default
yes Route <presenter>-<action>[/maturita/<class>][/rok/<year>][/cena/<award>][/typ/<type>][/rocnik/<grade>][/kategorie/<category>] module = Front
presenter = Default
action = default
category = 
NULL

grade = 
NULL

type = 
NULL

award = 
NULL

year = 
NULL

class = 
NULL

Front:Default:authors
class = 2008
category = 
NULL

grade = 
NULL

type = 
NULL

award = 
NULL

year = 
NULL

¤ ×