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

Wrong Query in functions_posting.php

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Resolution: Invalid
    • Other
    • 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

            Phil Phil Crumm [X] (Inactive)
            Mohs Mohs [X] (Inactive)
            Archiver:
            Noxwizard Patrick Webster

            Dates

              Created:
              Updated:
              Resolved:
              Archived: