0

I've had a look at this solution here. 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.

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()
9
  • Look at Martijn's answer. Commented Jun 9, 2016 at 13:17
  • I have.. it says it doesnt recognize "{}" when i try it. Could you help by telling me how i could do it in my version of the code Commented Jun 9, 2016 at 13:22
  • There is no {} in the code you've shown. Commented Jun 9, 2016 at 13:23
  • As in when i attempt to use { } in order to make it work Commented Jun 9, 2016 at 13:24
  • And how should anybody else know what you've attempted? Commented Jun 9, 2016 at 13:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.