web工程查不到数据

xml中:

 <select id="selectIptvMessage" parameterType="pojo.IptvMessage" resultMap="BaseResultMap">    

    select  
    <include refid="Base_Column_List" />
    from iptv_message where 1 = 1   
        <if test="columnName != null and columnName !=''">    
            and column_name = #{columnName}    
        </if>    
        <if test="columnTitle != null and columnTitle !=''">    
            and column_title = #{columnTitle}    
        </if>
        <if test="endTime != null and endTime !=''">    
            and column_time &lt;= #{endTime}    
        </if>    
        <if test="startTime != null and startTime !=''">    
            and column_time &gt;= #{startTime}    
        </if>
        <if test="city != null and city !=''">    
            and city = #{city}    
        </if>
        <if test="county != null and county !=''">    
            and county = #{county}    
        </if>    
        <if test="town != null and town !=''">    
            and town = #{town}    
        </if>
        <if test="iptvName != null and iptvName !=''">    
            and iptv_name = #{iptvName}    
        </if>

  </select>

页面正常显示,如果没有条件,显示正常,稍微有一个条件查询不到数据,log4j日志有sql语句,有参数,结果为空。

在navicat里查询有数据。

很怪异的错误。好几个人都看了都没有找到问题所在。后来,把工程和数据库布置到另一台电脑上,竟然可以查到数据。

看来不是程序本身的错误,起码有了方向,开始从软件着手,eclipse换成那台电脑的版本,tomcat也换掉,jdk从新配置安装,环境变量配置,最后问题锁定在了数据库,

重新安装mysql,问题得到了解决。

建立数据库的时候要选择字符集,其实经验丰富的人早就想到了,一输入汉子就不出结果,肯定要考虑字符集。希望对他人有所帮助。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值