You might want to check out the query object too. It makes building
queries very easy.
http://code.google.com/appengine/docs/python/datastore/queryclass.html
words = MyWords.all()
words.filter('owner', owny)
words.filter(...)
words.order(...)
word = words.get()
Robert
On Mon, Sep 27, 2010 at 03:06, Rodsit <[email protected]> wrote:
> Oh, I found it now, its:
> owny = '9999'
>
> rotaColl = db.GqlQuery("SELECT * FROM MyWords WHERE owner = :1 ORDER BY
> date DESC LIMIT 1 ", owny)
>
> On 27 September 2010 07:47, Droid <[email protected]> wrote:
>>
>> Why doesn't this work: (it cannot get variable owny correctly)
>>
>> owny =
>> '8888'
>> rotal = db.GqlQuery("SELECT * FROM MyWords WHERE owner = "+owny+"
>> LIMIT 100")
>>
>> Above code works in most languages, but not Python seemingly.
>> It simply does not insert 8888 into my Select statement. Easy I know,
>> but how do I do this?
>>
>> I have tried all the simple things but must be missing something.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.