Now I don’t actually need to return the ‘imageComments’ because I won’t be displaying them with this query. I only want to count the number of ‘imageComments’ for each Image and return that integer. How can I do this?
Oh I see. Implementing a method to return the count would require a another query. So I can either query the database another time to return the counts, or I could return the imageComments with the first query and use php count() to count the results (this is my original design but I realized it might not be the best solution). Which is a more efficient scenario?