Openx postgres error
I installed OpenX on postgres and I get an error on Stats page:
MDB2 Error: unknown error
_doQuery: [Error message: Could not execute statement]
[Last executed query: SELECT m.clientid AS advertiser_id,d.campaignid AS placement_id,s.ad_id AS ad_id,SUM(s.impressions) AS sum_views,SUM(s.clicks) AS sum_clicks,SUM(s.revenue) AS sum_revenue, m.campaignid || IF( LENGTH(market_advertiser_id) > 0, ('_' || market_advertiser_id || '_'), '_') || ad_width || ' x ' || ad_height AS ad_id,( m.campaignid || IF( LENGTH(market_advertiser_id) > 0, ('_' || market_advertiser_id || '_'), '_') || ad_width || ' x ' || ad_heig开发者_如何学Pythonht ) AS pkey FROM "ox_ext_market_stats" AS s INNER JOIN "ox_banners" AS d ON (d.bannerid=s.ad_id) INNER JOIN "ox_campaigns" AS m ON (m.campaignid=d.campaignid) INNER JOIN "ox_clients" AS a ON (a.clientid=m.clientid) WHERE s.ad_id IN (1,2) AND s.zone_id = 0 AND a.type = 1 AND s.date_time>='2011-01-26 23:00:00' AND s.date_time<='2011-01-27 22:59:59' AND s.zone_id = 0 GROUP BY advertiser_id,placement_id,pkey]
[Native message: ERROR: column "s.ad_id" must appear in the GROUP BY clause or be used in an aggregate function at character 65]
Fatal error: Unsupported operand types in /home/me/public_html/openxtest/www/admin/market/stats.php on line 164
So my question is: where I must edit code for modify query as above?
Ok, i have found a solution. To fix the problem, must add this code after line 1031 in lib/max/SqlBuilder.php:
$aGroupColumns[] = "s.ad_id";
精彩评论