Commit 70c6386b by Joneq

增加1的打印

parent d13698a3
Showing with 6 additions and 6 deletions
......@@ -13,17 +13,17 @@ func main() {
var user_info model.UserInfo
var user_company model.UserCompany
//查找手机号
err := dao.GetCmsDb().QueryRowx("select mobile from user_info where userId = ?",1599).StructScan(&user_info)
//查找公司名称
err := dao.GetDb().QueryRowx("select com_name from lie_user_company where user_id = ?",1).StructScan(&user_company)
if err != nil {
fmt.Println(err)
}
fmt.Println(user_info.Mobile)
fmt.Println(user_company.Com_name)
//查找公司名称
err = dao.GetDb().QueryRowx("select com_name from lie_user_company where user_id = ?",1).StructScan(&user_company)
//查找手机号
err = dao.GetCmsDb().QueryRowx("select mobile from user_info where userId = ?",1599).StructScan(&user_info)
if err != nil {
fmt.Println(err)
}
fmt.Println(user_company.Com_name)
fmt.Println(user_info.Mobile)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment