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 '-1' at line 5select listing.id, listing.name, sum(progvotes.pointsgiven) as `total` from `progvotes` left join `listing` on progvotes.listingid = listing.id where progvotes.whenadd + interval 7 day >= now() and listing.type = 'hyip' and listing.hyipstatus = 'on' group by progvotes.listingid order by `total` desc limit -1