How to 'order by' a variable in Python and SQL?
<p>I've had a look at <a href="https://stackoverflow.com/questions/29646301/passing-a-column-name-in-a-select-statement-in-python">this solution here</a>. But I don't quite fully understand what is going on, hence I don't know how to use a similar technique in my code.</p>

<pre><code>order = "Movies.Rating_IMDB ASC"

general = db.execute (
    """
    SELECT Movies.Movie_ID, Movies.Name, Movies.Year, Movies.Image
    FROM Movie_Genre
    JOIN Movies ON Movie_Genre.Movie_ID = Movies.Movie_ID
    JOIN Genres ON Movie_Genre.Genre_ID = Genres.Genre_ID
    WHERE Genres.Genre = ?
    ORDER BY ?;
    """,
    (str(selectedGenre), order,)
    )
basic = general.fetchall()
</code></pre>