当前位置: 代码迷 >> MySQL >> 刚开始玩mysql if条件即是具体值 的判断
  详细解决方案

刚开始玩mysql if条件即是具体值 的判断

热度:194   发布时间:2016-05-05 16:35:43.0
刚开始玩mysql if条件等于具体值 的判断

mysql等于具体某值的判断时,要加上.toString()函数

 <if test="dataSort !=null and dataSort !='' and dataSort =='1'.toString()">          order by  price asc      </if>  <if test="dataSort == null or dataSort =='0'.toString()">          order by  addtime desc  </if>

?

  相关解决方案