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-center and session_id = "6f11526rj8ggbbitdo7s5267e0"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = apartment-in-the-center and session_id = "6f11526rj8ggbbitdo7s5267e0"