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-pool-in-petra-recently-renovated-for-8-people and session_id = "c3a51b20...' at line 1: SELECT * FROM reservas WHERE propiedad_fk = modern-house-with-pool-in-petra-recently-renovated-for-8-people and session_id = "c3a51b20imof8e52mnvnnig5u1"