Closed (fixed)
Project:
Table Wizard
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2010 at 17:59 UTC
Updated:
13 Jul 2010 at 01:10 UTC
* 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
Comment #1
cedarm commentedOops.. needs review.
Comment #2
mikeryanHmmm, strange that I see no error on MySQL, the query is obviously wrong... But, committed, thanks!