DataObjects/Office.php
authorChris <chris@roojs.com>
Tue, 8 Jan 2013 10:00:39 +0000 (18:00 +0800)
committerChris <chris@roojs.com>
Tue, 8 Jan 2013 10:00:39 +0000 (18:00 +0800)
DataObjects/Office.php

index 7784c7f..dc0fc46 100644 (file)
@@ -37,10 +37,12 @@ class Pman_Core_DataObjects_Office extends DB_DataObject
             $p->selectAdd("DISTINCT(office_id) as office_id");
             $officeIds = $p->fetchAll('office_id');
             //$this->whereAddIn('Office.id', $officeIds, 'INT', 'AND');
-            
-            $this->whereAdd("
-                    Office.id = $officeIds
+            foreach($officeIds as $id){
+                $this->whereAdd("
+                    Office.id = $id
                 ");
+            }
+            
             
             $this->joinAddCountryWithPerson();
         }