[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 ('87') OR l.charity_id IS NULL) AND (l.category_id IN (6201, 6392, 6393, 6394, 6395, 6396, 6397, 6398, 6399, 6400, 6405, 6401, 6402, 6403, 6404) OR l.addl_category_id IN (6201, 6392, 6393, 6394, 6395, 6396, 6397, 6398, 6399, 6400, 6405, 6401, 6402, 6403, 6404)) 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, 87) DESC, IF(l.listing_type='auction', IF(max(b.amount) is null, l.start_price, max(b.amount)), l.buyout_price) DESC 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 ('87') OR l.charity_id IS NULL) AND (l.category_id IN (6201, 6392, 6393, 6394, 6395, 6396, 6397, 6398, 6399, 6400, 6405, 6401, 6402, 6403, 6404) OR l.addl_category_id IN (6201, 6392, 6393, 6394, 6395, 6396, 6397, 6398, 6399, 6400, 6405, 6401, 6402, 6403, 6404)) 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, 87) DESC, IF(l.listing_type='auction', IF(max(b.amount) is null, l.start_price, max(b.amount)), l.buyout_price) DESC LIMIT 20