[Cube\Exception]
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'charity_id' in order clause is ambiguous [Query]: SELECT l.*, max(b.amount) as current_bid FROM ppb_listings AS l LEFT JOIN ppb_bids AS b ON b.listing_id = l.id WHERE (l.charity_id IN ('91') OR l.charity_id IS NULL) AND (l.category_id IN (3691, 6175, 6176, 6177, 6178, 6179, 6184, 6180, 6185, 6181, 6182, 6183) OR l.addl_category_id IN (3691, 6175, 6176, 6177, 6178, 6179, 6184, 6180, 6185, 6181, 6182, 6183)) AND (l.listing_type IN ('auction', 'product')) AND (l.draft = 0) AND (l.active = 1) AND (l.approved = 1) AND (l.closed = 0) AND (l.deleted = 0) AND (l.list_in != 'store') GROUP BY l.id ORDER BY FIELD(charity_id, 91) DESC, IF(l.listing_type='auction', IF(max(b.amount) is null, l.start_price, max(b.amount)), l.buyout_price) ASC LIMIT 20
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'charity_id' in order clause is ambiguous [Query]: SELECT l.*, max(b.amount) as current_bid FROM ppb_listings AS l LEFT JOIN ppb_bids AS b ON b.listing_id = l.id WHERE (l.charity_id IN ('91') OR l.charity_id IS NULL) AND (l.category_id IN (3691, 6175, 6176, 6177, 6178, 6179, 6184, 6180, 6185, 6181, 6182, 6183) OR l.addl_category_id IN (3691, 6175, 6176, 6177, 6178, 6179, 6184, 6180, 6185, 6181, 6182, 6183)) AND (l.listing_type IN ('auction', 'product')) AND (l.draft = 0) AND (l.active = 1) AND (l.approved = 1) AND (l.closed = 0) AND (l.deleted = 0) AND (l.list_in != 'store') GROUP BY l.id ORDER BY FIELD(charity_id, 91) DESC, IF(l.listing_type='auction', IF(max(b.amount) is null, l.start_price, max(b.amount)), l.buyout_price) ASC LIMIT 20