为什么检索数据前两项正常 可sle_1.text时候会把所有数据显示呢
string ls_khmc,ls_cwmc,ls_w
string ls_sql
ls_khmc=trim(sle_jfnd.text)
ls_cwmc=trim(sle_xm.text)
ls_w=trim(sle_1.text)
if ls_khmc<>'' and not isnull(ls_khmc) then
ls_sql="c_jfxx.xh="+"'"+ls_khmc+"'"
end if
if ls_cwmc<>'' and not isnull(ls_cwmc) then
if ls_sql="" or isnull(ls_sql) then
ls_sql="c_jfxx.xm='"+ls_cwmc+"'"
else
ls_sql=ls_sql+" and c_jfxx.xm='"+ls_cwmc+"'"
end if
if ls_w<>'' and not isnull(ls_w) then
if ls_sql="" or isnull(ls_sql) then
ls_sql="c_jfxx.jfnd='"+ls_w+"'"
else
ls_sql=ls_sql+" and c_jfxx.jfnd='"+ls_w+"'"
end if
end if
end if
dw_1.setfilter(ls_sql)
filter(dw_1)
dw_1.retrieve()
为什么检索数据前两项正常 可sle_1.text时候会把所有数据显示呢
出了什么问题呢