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