Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10290

Who's online broken due to malformed SQL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Other
    • Labels:
      None
    • Environment:
      xampp 1.7.3
      php 5.3.1
      MySQL(i) 5.1.41
      apache 2.2.14
      Internet Explorer 9

      Description

      was checking out 3.1.0-dev from the svn yesterday and came across this error when trying to view viewonline.php

      SQL ERROR [ mysqli ]

      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 '> 0 ORDER BY group_legend ASC' at line 3 [1064]

      SQL

      SELECT group_id, group_name, group_colour, group_type, group_legend FROM phpbb_groups WHERE group_legend = > 0 ORDER BY group_legend ASC

      BACKTRACE

      FILE: includes/db/mysqli.php
      LINE: 182
      CALL: dbal->sql_error()

      FILE: viewonline.php
      LINE: 397
      CALL: dbal_mysqli->sql_query()

        Issue Links

          Activity

          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          Looks like https://github.com/phpbb/phpbb3/commit/66322041#L3R380 is responsible. The equals sign should be deleted according to other changes.

          Show
          Oleg Oleg [X] (Inactive) added a comment - Looks like https://github.com/phpbb/phpbb3/commit/66322041#L3R380 is responsible. The equals sign should be deleted according to other changes.
          Hide
          bprsk8r4272 bprsk8r4272 [X] (Inactive) added a comment -

          that worked
          changed:
          WHERE group_legend = > 0
          to:
          WHERE group_legend > 0

          Show
          bprsk8r4272 bprsk8r4272 [X] (Inactive) added a comment - that worked changed: WHERE group_legend = > 0 to: WHERE group_legend > 0
          Hide
          imkingdavid David King added a comment -

          I have patched this using Oleg's suggestion of removing the equals sign, pending merge.

          Show
          imkingdavid David King added a comment - I have patched this using Oleg's suggestion of removing the equals sign, pending merge.
          Hide
          brunoais brunoais added a comment -

          View online feature shows correctly in the tests for develop branch

          Show
          brunoais brunoais added a comment - View online feature shows correctly in the tests for develop branch

            People

            • Assignee:
              Oleg Oleg [X] (Inactive)
              Reporter:
              bprsk8r4272 bprsk8r4272 [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development