示例#1
0
func LoadWithdrawalsByStatus(c db.MConn, coin string, status int32, limit uint) []*Withdrawal {
	rows, err := c.QueryAll(Withdrawal{},
		`SELECT `+WithdrawalModel.FieldsSimple+`
         FROM account_withdrawal
         WHERE status=? AND coin=?
         ORDER BY id ASC LIMIT ?`,
		status, coin, limit,
	)
	if err != nil {
		panic(err)
	}
	return rows.([]*Withdrawal)
}