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-puerto-pollensa and session_id = "7mjgqd6pdcuc8atcpe4hu7lhf5"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = family-villa-with-pool-in-puerto-pollensa and session_id = "7mjgqd6pdcuc8atcpe4hu7lhf5"