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