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-putxet-gotmar and session_id = "al5hunva1i6c0ipvaba2r2k4t4"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = villa-in-putxet-gotmar and session_id = "al5hunva1i6c0ipvaba2r2k4t4"