The code represents the results of the votes and also the total number of votes for each question. (variable total_votes) It works properly but what I am trying to achieve is to sort the results by the variable (total_votes) descending. I mean that the most voted question or result lies at the top and continues with the next most voted question in the next line.
have been trying to sort it out with (ORDER BY total_votes ASC) at the end of %LOOP% but it did not work.
Any comments about the correct usage of the code is appreciated.