rcom10002 / ccgclient

Automatically exported from code.google.com/p/ccgclient
0 stars 1 forks source link

关于字符串判空问题 #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
SystemLogService.java
LogInfoService.hbm.xml

        WHERE
            (? = '' or log_info.type = ?)
        AND log_info.create_time BETWEEN ? AND date_add(?, 
interval 1 day)
        AND UPPER(log_info.caption) like UPPER(?)
        ORDER BY log_info.create_time desc, log_info.caption asc

第一个问号,你传入的参数是空字符串还是null?

如果是null,是不是应该改成【? IS NULL OR LOG_INFO.TYPE = ?】呢?

调查一下,把结果放到comments里

Original issue reported on code.google.com by rcom10002 on 20 Aug 2009 at 9:49

GoogleCodeExporter commented 9 years ago
是空字符串,因为我加了个条件是全部传参时,传的是空字��
�串

Original comment by songjie8...@gmail.com on 21 Aug 2009 at 6:00