开发者

AppEngine GqlQuery (WHERE NOT)

I want to find all employees from a company where the telephone number is NOT empty.

开发者_StackOverflow

Now I have this:

db.GqlQuery('SELECT * FROM Employee '
       'WHERE company = :company '
       'AND phone > :nophone', company=company, nophone=None)

But this always prints out empty results although there are items with telephone number.


try to use

db.GqlQuery('SELECT * FROM Employee  '
  'WHERE company = :company '
  'AND phone != :nophone', company=company, nophone=None)

read more about the operators here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜