Found the problem! This is an old database given by our customer. My guess is that is not supported by mysqli. Just created a new one and everything works fine. Strange though, that "insert" was the only behavior that was inoperative. Thanks for your assistance.