@millenniumproof I refactored the "Top 5" table to only consider ideas that have been approved by crowdflower
I also refactored the logic a bit that selects the next idea to be shown in voting. I'm instead passing the "previous idea id" to the get_idea function which then gets the next idea in the ideas table that has been approved. I like it a bit more because its not running multiple queries on the sql server. What do you think?
This is the query:
SELECT Idea.id, Idea.title, Idea.text_description, Idea.image FROM Idea INNER JOIN Screening_results_crowdflower ON Screening_results_crowdflower.id_idea = Idea.id WHERE Idea.id > 2 AND Screening_results_crowdflower.accepted = 1 ORDER BY Idea.id ASC LIMIT 1";
Where 2 is the idea of the idea previously shown
i also removed old images, I was getting weird errors on the server that it was "full"
@millenniumproof I refactored the "Top 5" table to only consider ideas that have been approved by crowdflower
I also refactored the logic a bit that selects the next idea to be shown in voting. I'm instead passing the "previous idea id" to the get_idea function which then gets the next idea in the ideas table that has been approved. I like it a bit more because its not running multiple queries on the sql server. What do you think?
This is the query:
SELECT Idea.id, Idea.title, Idea.text_description, Idea.image FROM Idea INNER JOIN Screening_results_crowdflower ON Screening_results_crowdflower.id_idea = Idea.id WHERE Idea.id > 2 AND Screening_results_crowdflower.accepted = 1 ORDER BY Idea.id ASC LIMIT 1";
Where 2 is the idea of the idea previously showni also removed old images, I was getting weird errors on the server that it was "full"