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,Vindplaats001 FROM cards INNER JOIN foto ON cards.FotoID = foto.ID INNER JOIN cards_cat_related ON cards.Id = cardid WHERE status='1' AND catid='3' ORDER BY Id DESC LIMIT -1,1