Select * from kb_pay where userid like '' and kind=1 and start_date <= now() and end_date >= now() and pay_no not like '' order by idx desc limit 1