On Mon, 2006-05-15 at 20:43 +1000, Malcolm Tredinnick wrote:
> Michael Radjiez quite reasonably raised a problem with a recent change I
> made to fix a bug with QuerySet.count() (it was previously ignoring any
> "distinct" modifiers). The problem is that if you are using a version of
> SQLite prior to version 3.2.6 (released in September 2005),
> QuerySet.distinct().count() generates a query that is not understood by
> your version of SQLite. :-(

I may have omitted to be clear about the details here: in versions prior
to 3.2.6, 

        SELECT DISTINCT ...

and

        SELECT COUNT(...) ...

both work. But

        SELECT COUNT(DISTINCT(...)) ...
        
is considered illegal SQL. COUNT() was enhanced in 3.2.6 to support the
DISTINCT function.

Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to