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 and session_id = "co3p7vig6942bfkc8vg5e2uk10"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = lovely-apartment-with-pool and session_id = "co3p7vig6942bfkc8vg5e2uk10"