func selectData()

in at/non_transaction/main.go [146:158]


func selectData(id int64) {
	var orderTbl OrderTbl
	row := db.QueryRow("select id,user_id,commodity_code,count,money,descs from  order_tbl where id = ? ", id)
	err := row.Scan(&orderTbl.id, &orderTbl.userID, &orderTbl.commodityCode, &orderTbl.count, &orderTbl.money, &orderTbl.descs)
	if err != nil {
		if errors.Is(err, sql.ErrNoRows) {
			fmt.Println("select return null")
			return
		}
		panic(err)
	}
	fmt.Printf("select --> : %v\n", orderTbl)
}