MySQL accounting issue