I am developing Content / Comment system..
I want: For each content in array to be returned maximum 10 comments..
I tryed LIMIT 20
, but this is limiting the total results, how to limit only the repeated values in column comment_id
$contentidArray
is array of content ID's
$sthandler = $conn->prepare("SELECT * FROM comments WHERE content_id in (".$contentidArray.") order by total_reactions desc");
$sthandler->execute();