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 'with-oceanfront-pool-for-6-people and session_id = "kpflhnnsnglladfrs4bj1htdi3"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = modern-villa-with-oceanfront-pool-for-6-people and session_id = "kpflhnnsnglladfrs4bj1htdi3"