$sql = "select * from `znxfy_user_card` where user_id='$uid' and concat(',',goodsid,',') like '%,$id,%' and unix_timestamp(now())-active_time<=yx_date*24*60*60 and remain_number>0 order by active_time+yx_date*24*60*60-unix_timestamp(now()) desc limit 1";