![]() |
#2
zhuiis2011-04-26 22:46
|
为便于理解,调整如下:
sql4="select sum(sfje) as sfhj, sum(tfje) as tfhj from checkinout where checkIDCARD='"&request("idcard")&"' group by checkIDCARD "
出来的结果就是所有tfje的金额合计没有进行筛选
若把变量换成固定数值的时候,运行的结果正确,如下:
(tfje) as tfhj from checkinout where checkIDCARD='92322372398908908X' group by checkIDCARD "
结果就正确,问题出在哪里?请指教!!!

[ 本帖最后由 boyfuture 于 2011-4-27 21:30 编辑 ]