Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-19110

ezsurvey : Looking at the survey result generates a SQL error (postgres)

    XMLWordPrintable

    Details

      Description

      To reproduce:

      1. Create a survey
      2. Submit a survey
      3. Click on the "Survey" tab in admin ( link: /survey/list/ ) 
      4. Click the "Results" icon on the left ( link: /survey/result/58/182/eng-GB )
      5. Click the "All evaluations" tab
      

      You'll then get the following SQL error:

      Warning: PHP: E_WARNING 	Feb 03 2012 15:31:29
      pg_query(): Query failed: ERROR:  column "ezsurveyresult.tstamp" must appear in the GROUP BY clause or be used in an aggregate function
      LINE 6: ...                  language_code='eng-GB' ORDER BY ezsurveyre...
                                                                   ^ in /var/www/ezp/.run/lib/ezdb/classes/ezpostgresqldb.php on line 202
      
      Error: eZPostgreSQLDB 	Feb 03 2012 15:31:29
      Error: error executing query: SELECT count( ezsurveyresult.id ) as count FROM
                               ezsurveyresult, ezsurvey WHERE
                               ezsurveyresult.survey_id=ezsurvey.id AND
                               contentclassattribute_id='182' AND
                               contentobject_id='58' AND
                               language_code='eng-GB' ORDER BY ezsurveyresult.tstamp DESC: ERROR:  column "ezsurveyresult.tstamp" must appear in the GROUP BY clause or be used in an aggregate function
      LINE 6: ...                  language_code='eng-GB' ORDER BY ezsurveyre...
                                                                   ^
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              vl Vidar Langseid
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: