I have this query:
$score = 10;
SELECT timecode, count(tag) as n_tags, tag
FROM dados
WHERE dados.tag = 'tag1'
AND dados.filename = 'file.mp4'
AND (timecode >= '-5' AND timecode <= '15')
AND (timecode = '$score')
GROUP BY timecode
ORDER BY count(tag) DESC
However I want to change the 6 line to:
AND (timecode = '$score' AND n_tags > 3)
but it doesn't seems the correct way to do, it doesn't work.
Any ideas ?
timecode = '$score'and checking if it is in a rangetimecode >= -5 AND timecode <= 15. Is$scoreinside that range? (so why do you need the range at all?)