Error 500

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'spaceco_test.p.date_created' which is not in SELECT list; this is incompatible with DISTINCT