Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1,1' at line 1 Query:SELECT cards.Id,Vindplaats201 FROM cards INNER JOIN foto ON cards.FotoID = foto.ID INNER JOIN cards_cat_related ON cards.Id = cardid WHERE status='1' AND catid='6' ORDER BY Id DESC LIMIT -1,1