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-sea-views-and-pool-for-6-people-in-font-de-sa-cala and session_id = "rj8...' at line 1: SELECT * FROM reservas WHERE propiedad_fk = villa-with-sea-views-and-pool-for-6-people-in-font-de-sa-cala and session_id = "rj8e3n1tqnm23bo77kbc6n1ei3"