*** DB error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-24, 24) tmp, offer o LEFT JOIN offerdetail d ON o.id = d.offer_id WHERE tmp.id ' at line 1 (1064)