How to fix CR_STMT_CLOSED (2056): Statement closed indirectly in MySQL | DevErrors