[BUG][2.8.1] SQLSTATE[42000]

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [BUG][2.8.1] SQLSTATE[42000]

    SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system, planet.planet as planet, planet.planet_type as planet_type, total_' at line 3


    Query-Code:SELECT planet.id_owner as id_owner, planet.galaxy as galaxy, planet.system as system, planet.planet as planet, planet.planet_type as planet_type, total_points, onlinetime, urlaubs_modus, banaday, authattack FROM uni1_planets planet INNER JOIN uni1_users user ON planet.id_owner = user.id LEFT JOIN uni1_statpoints as stat ON stat.id_owner = user.id AND stat.stat_type = '1' WHERE planet.id = 3;
    File: /includes/classes/Database.class.php
    Line: 127
    URL: /game.php?page=fleetAjax&ajax=1&mission=6&planetID=3
    PHP-Version: 7.4.30
    PHP-API: fpm-fcgi
    Version: 2.8.1
    Debug Backtrace:
    #0 /includes/classes/Database.class.php(203): Database->_query()
    #1 /includes/pages/game/ShowFleetAjaxPage.class.php(140): Database->selectSingle()
    #2 /game.php(59): ShowFleetAjaxPage->show()
    #3 {main}
  • /includes/pages/ShowFleetAjaxPage.class.php line 131

    Source Code

    1. planet.system as system


    replace by

    Source Code

    1. planet.system as `system`


    You will have to fix this issue at different place of the code because system is a reserved word

    In a good code editor, you can notice that because the word appear in blue
  • go2moons wrote:

    /includes/pages/ShowFleetAjaxPage.class.php line 131

    Source Code

    1. planet.system as system

    replace by

    Source Code

    1. planet.system as `system`

    You will have to fix this issue at different place of the code because system is a reserved word

    In a good code editor, you can notice that because the word appear in blue

    The problem has been solved, thank you