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 'and-aesthetics and session_id = "ku4go1fv353bcklf7et679qi63"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = commercial-premises-transfer-hairdressing-and-aesthetics and session_id = "ku4go1fv353bcklf7et679qi63"