[Django]-Parameter binding using GQL in Google App Engine

3👍

Substitute:

 "...WHERE rand1 > :rand2 ORDER BY rand LIMIT 1")

with:

  "...WHERE rand1 > :rand2 ORDER BY rand LIMIT 1", rand2=rand2)

Or

  "...WHERE rand1 > :1 ORDER BY rand LIMIT 1", rand2)

See for more information: “The Gql query class

The funny thing is that I have just learned this about 2 hrs ago 😛

Leave a comment