Pman/Roo.php
authorAlan Knowles <alan@akbkhome.com>
Thu, 11 Nov 2010 11:18:56 +0000 (19:18 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 11 Nov 2010 11:18:56 +0000 (19:18 +0800)
Pman/Roo.php

index f7af088..3122b1a 100644 (file)
@@ -709,7 +709,7 @@ class Pman_Roo extends Pman
                 $cols = array();
                 foreach($xx as $c) {
                     $tn = sprintf($ocl.'_%s', $c);
-                    if ($tn == $distinct) {
+                    if ($distinct && $tn == $distinct) {
                         $has_distinct = 'DISTINCT( ' . 'join_'.$ocl.'_'.$col.'.'.$k .')  as ' . $tc ;
                         $this->countWhat =  'DISTINCT  join_'.$ocl.'_'.$col.'.'.$k;
                         continue;