Closed yanserliu closed 5 years ago
has, err := engine.Table(&user).Where("id = ?", id).Cols("name").Get(&name) // SELECT name FROM user WHERE id = ? 指定到从user表中获取name字段。
has, err := engine.Table(&user).Where("id = ?", id).Cols("name").Get(&name) // SELECT name FROM user WHERE id = ? 指定到从user表中获取name字段。