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-lots-of-potential and session_id = "iajks1rma48nivaa7vvl6s5070"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = single-level-house-with-lots-of-potential and session_id = "iajks1rma48nivaa7vvl6s5070"