我的专栏如下: -
我想在查询中做的是选择路径不像'% node/ %'
的所有行,但是有一个例外。
我想要显示路径'node/109'
的这一行。
这就是我所做的: -
SELECT
COUNT(path) as hits, path as link, MAX(title) as page FROM accesslog
WHERE
MONTH(FROM_UNIXTIME(timestamp)) = 11
AND path NOT LIKE '%node/%'
GROUP BY path ORDER BY hits DESC
可能的?
答案 0 :(得分:2)
那么如果你将它改为具体的(用括号)
会怎样AND ( path LIKE '%node/109%'
OR path NOT LIKE '%node/%')