Get 2 results per each in id from table?

My query:

SELECT * FROM  `posts` 
WHERE  LENGTH(`message`) > 10 
and `message` not like '%[url=%' 
and `message` not like '%[img]%' 
and `message` not like '%[quote%' 
and `message` not like '%https%' 
and `message` not like '%http%' 
and `message` not like '%www%' 
and `fid` in ('$fids')  
limit 10 

$fids is a dinamic array composed of x ids.

How can I get let say 2 results per each id?

which two? ya gotta have some criterion for selecting them

obvious answer is window functions but you gotta be on MySQL 8 for that

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.