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 'in-the-residential-area-of-pinaret and session_id = "1ths08d3u0888lr6834ahtqts6"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = modern-penthouse-apartment-in-the-residential-area-of-pinaret and session_id = "1ths08d3u0888lr6834ahtqts6"