SQL:SELECT DISTINCT COUNT(DISTINCT d.id, version),d.id as id, dv.version as version, d.ord as ord, dv.status as status, d.parent_id as parent_id, d.template_id as template_id, t.uname as template_uname, t.has_template_fields as has_content, d.folder as folder, d.uname as uname, dv.name as name, dv.title as title, dv.keywords as keywords, dv.description as description, dv.default_handler as default_handler, dv.time_created as timestamp_created, dv.time_modified as timestamp_modified, dv.time_publish as timestamp_publish, dv.time_expires as timestamp_expires,0 as relevance FROM document as d,document_version as dv,template as t,document_category_cache as doc_cat_cache WHERE d.id=dv.document_id AND t.id=d.template_id AND dv.document_id=doc_cat_cache.document_id AND dv.version=doc_cat_cache.document_version AND MATCH doc_cat_cache.categories AGAINST ('+("c111cc")' IN BOOLEAN MODE) AND (status = 'published') ORDER BY title ASC LIMIT 25,5
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause