I'm really sorry if this question has already been asked, or answered, but I can't quite seem to find what I need.
I have every other piece of this built, my only question is surrounding inline comments. I would like to do something similar to what Facebook does where they render x comments with a button to display all y comments.
However, the only two ways I can see of doing this are:
- Performing a SELECT in the loop that renders each item (I think anyone who might have an answer to this would agree with me that this is a terrible decision)
- Performing one large select to pull all comments where news_id is in a certain subset, and then use PHP to iterate over them, select the x most recent, and ignore the rest.
Neither one of these seems like a good solution; however, as they both involve a huge waste of resources.
Does anyone have a potential suggestion for implementing this?