Quote:
Originally Posted by sockwater
I'm not quite following you. Post #1054 shows how, with one query, you can pull all the information (what the vote was, the voter's username & userid) on each vote for each post being displayed in the thread, and puts it in an array that's indexed by postid. You can use that array to display all a given post's votes, showing what the vote was and linking the voter's username to their profile below the postbit when that post author is viewing the thread. I was only showing you how it can be done with one query per thread instead of one query for each post in the thread. No restructuring of the vote data needed. Hopefully I've explained this well.
|
sockwater,
Your example is very useful however the feature people have been asking for is a summary of a user's entire voting results (i.e. votes to all of their posts). So to do this I would still need to fetch all of their posts... hence the extra query. There are a few other requests where I think the code you provided would come in handy but the big one I've been working to address is the overall voting results.
I've already mapped out ways to do this without an extra query but with a few changes to the tables (creating an overall history for each user) and that's my next step.