两个比较函数Mysql

时间:2013-06-02 18:41:27

标签: php mysql function comparison

我如何使用两个比较mysql函数?

像这样:

第一

 GROUP BY 
      data_raport HAVING hours <= '8:00'

第二

GROUP BY 
  data_raport HAVING hours > '8:00' but not higher than < 14

第三

GROUP BY 
  data_raport HAVING hours > '14:00' but not higher than < 24

1 个答案:

答案 0 :(得分:1)

您是否正在寻找类似AND关键字的内容:
GROUP BY data_raport HAVING hours > '8:00' AND hours < '14:00'

或者你想将第二组和第三组合在一起,而不是完全确定!?