* warning: pg_query(): Query failed: ERROR: column "tt.view_name" must appear in the GROUP BY clause or be used in an aggregate function in /home/cmyers/svn_workspace/gaiamlife_d6_trunk/includes/database.pgsql.inc on line 139.
    * user warning: query: SELECT tt.twtid,tt.tablename,tt.dbconnection,tt.view_name,COUNT(*) AS cnt FROM eph_tw_tables tt INNER JOIN eph_tw_columns tc ON tt.twtid=tc.twtid WHERE tt.provide_view=1 AND tc.primarykey=1 GROUP BY tt.twtid,tt.tablename,tt.dbconnection in /home/cmyers/svn_workspace/gaiamlife_d6_trunk/sites/all/modules/tw/tw.views_default.inc on line 23.

Simple fix to tw.views_default.inc:

--- tw.views_default.inc	(revision 2811)
+++ tw.views_default.inc	(working copy)
@@ -19,7 +19,7 @@
           FROM {tw_tables} tt
           INNER JOIN {tw_columns} tc ON tt.twtid=tc.twtid
           WHERE tt.provide_view=1 AND tc.primarykey=1
-          GROUP BY tt.twtid,tt.tablename,tt.dbconnection";
+          GROUP BY tt.twtid,tt.tablename,tt.view_name,tt.dbconnection";
   $tblresult = db_query($sql);
   while ($tblrow = db_fetch_object($tblresult)) {
     // For a default view to be possible, the table must have a single primary key field

Comments

cedarm’s picture

Status: Active » Needs review

Oops.. needs review.

mikeryan’s picture

Status: Needs review » Fixed

Hmmm, strange that I see no error on MySQL, the query is obviously wrong... But, committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.