$热源,$年度' 都是字符串,现在需要多选,得出筛选出结果的合计
燃料累计购入金额.select(购入量,燃料 in('$热源') && 年度 in ('$年度'))
换成sql()函数取数把
sql("数据库连接名","select 购入量 from 表 where 燃料 in ('"+$热源+"') and 年度 ('"+$年度+"')",1)
记得需要分隔符是',' 不然就就是
sql("数据库连接名","select 购入量 from 表 where 燃料 in ('"+replace($热源,",","','")+"') and 年度 ('"+replace($年度,",","','")+"')",1)
燃料累计购入金额.select(购入量,inarray(燃料,$热源)>0&& inarray(年度,$年度)>0)