How is the backend of Weibo comment list implemented?

the two comments with the most likes attached to each comment are how to achieve the backend and how to ask for a great solution with high efficiency

Aug.06,2021

Database one-to-many relationship.

main comment table: zmemoridpr _ user _ journal _ textTimmy
sub-comment table: < _

determine the relationship between comments through z_id and display them selectively.

rank sub-comments by the number of likes given by order by, and get the first two comments through limit.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4517b-44b01.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4517b-44b01.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?