Uploaded image for project: 'Support Team Tools'
  1. Support Team Tools
  2. STT-131

Wrong Query in functions_posting.php

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Invalid
    • Component/s: Other
    • Labels:
      None

      Description

      Version 3.0.7
      Lines 86 - 93:
      if ($mode == 'window')

      { $sql = 'SELECT smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height FROM ' . SMILIES_TABLE . ' GROUP BY smiley_url, smiley_width, smiley_height ORDER BY MIN(smiley_order)'; $result = $db->sql_query_limit($sql, $config['smilies_per_page'], $start, 3600); }

      It is not possible to ORDER BY with group functions.
      Fix: Replace ORDER BY MIN(smiley_order) with ORDER BY smiley_order
      you could select MIN(smiley_order) AS min_smiley_order and afterwards ORDER BY min_smiley_order.
      But that's not interesting here.
      We just want to get those smileys ordered

        Attachments

          Activity

            People

            • Assignee:
              Phil Phil Crumm [X] (Inactive)
              Reporter:
              Mohs Mohs [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: