diff --git a/VERSION b/VERSION index 3231ceb5..74bcbc09 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-14 17:50:45) dev +Version 2.00.0 (2012-07-14 17:55:21) dev diff --git a/gluon/dal.py b/gluon/dal.py index 80fb2d4d..ad28a276 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -959,7 +959,8 @@ class BaseAdapter(ConnectionPool): return 'UPPER(%s)' % self.expand(first) def COUNT(self, first, distinct=None): - return 'COUNT()' if not distinct else 'COUNT(DISTINCT %s)' % self.expand(first) + return ('COUNT(%s)' if not distinct else 'COUNT(DISTINCT %s)') \ + % self.expand(first) def EXTRACT(self, first, what): return "EXTRACT(%s FROM %s)" % (what, self.expand(first))