Fixed sql bugs;added a new property of CowInfo;