各位幫我看一下SQL語句
因为我写了or SixDate='' 所以查询时把所有为空的记录都显示了出来,我只想显示>=当前日期符合条件的记录的,当然也包括符合条件的的SixDate为空的记录。
sqlstr="select * from Jz_table where id<>0 and (year(SixDate) >= " & Cyear & " and month(SixDate) >= " &Cmonth& " and day(SixDate) >= " & nowdate & ") and Jzname like '%" & keyword & "%' or SixDate='' order by id desc"
当我把or SixDate=''改为and SixDate=''的话查询时查不到记录,