I have a big problem with GQL

    # tests = db.GqlQuery("SELECT * FROM Test WHERE web='
http://locallocal.com'") # Work

return results!!

but if me search = in datetime, newer work, for example:

# tests = db.GqlQuery("SELECT * FROM Test WHERE datetime='2009-04-08
08:38:14.430060'") # But this dont work <-- PROBLEM HERE
 # tests = db.GqlQuery("SELECT * FROM Test WHERE datetime='2009-04-08
08:38:14'") # But this dont work <-- PROBLEM HERE

return 0 result!!, but it's false!! becose exist!! (i can see for example in
admin area in data viewer)

Sorry for my bad english, plz some ideas, adjunt the little script






#!/usr/bin/env python
import urlparse
import wsgiref.handlers
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp \
  import template

# Modelos
class Test(db.Model):
  ip = db.StringProperty(required=True)
  web = db.LinkProperty(required=True)
  datetime = db.DateTimeProperty(auto_now_add=True)

class MyHandler(webapp.RequestHandler):
  def get(self):



    test = Test(
      ip = self.request.remote_addr,
      web = 'http://locallocal.com'
    )
    test.put()
    tests = db.GqlQuery("SELECT * FROM Test'")
    # tests = db.GqlQuery("SELECT * FROM Test WHERE web='
http://locallocal.com'") # Work
    # tests = db.GqlQuery("SELECT * FROM Test WHERE datetime='2009-04-08
08:38:14.430060'") # But this dont work <-- PROBLEM HERE
    # tests = db.GqlQuery("SELECT * FROM Test WHERE datetime='2009-04-08
08:38:14'") # But this dont work <-- PROBLEM HERE
    # datetime='2009-04-08 08:38:14.430060'' exist in my datastore
    values = {
      'tests': tests
    }
    self.response.out.write(
      template.render('ttest.html',
                       values))

    ip = 0
    values = { 'ip': ip }

def main():
  app = webapp.WSGIApplication([
    (r'/ttest.py', MyHandler)], debug=True)
  wsgiref.handlers.CGIHandler().run(app)

if __name__ == "__main__":
  main()

-- 
Saludos Cordiales

Eduardo Águila
Visitame http://eduardoaguila.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to