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 '?tip=Teren, 10' at line 4 - SELECT *,oferta.destinatie as destination, oferta.tip as tipul FROM oferta
JOIN `detalii_oferta` ON oferta.id = detalii_oferta.id_oferta
WHERE oferta.tip='Teren' AND subiect='vanzare' AND activ='1' AND confirmat='1'
ORDER BY `oferta`.`timestamp` DESC LIMIT 80?tip=Teren, 10