err=db.QueryRow(c,"select id from (SELECT *,qty-scanqty show_zan FROM `lie_erp_order` where materialno = ? and ordersn = ? order by show_zan asc) abc where show_zan >= ?",materialno,ordersn,num).Scan(&id)
err=db.QueryRow(c,"select id from (SELECT *,qty-scanqty show_zan FROM `lie_erp_order` where materialno = ? and ordersn = ? order by show_zan asc LIMIT 100) abc where show_zan >= ?",materialno,ordersn,num).Scan(&id)