DataObjects/Events.php
authorKH Lau <khlau@roojs.com>
Tue, 24 Oct 2017 02:24:08 +0000 (10:24 +0800)
committerKH Lau <khlau@roojs.com>
Tue, 24 Oct 2017 02:24:08 +0000 (10:24 +0800)
DataObjects/Events.php

index af10242..9585f5b 100644 (file)
@@ -250,12 +250,12 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
         
         if(!empty($q['query']['action'])) {
             $act = $this->escape($q['query']['action']);
         
         if(!empty($q['query']['action'])) {
             $act = $this->escape($q['query']['action']);
-            $this->whereAdd("Events.action LIKE '%{$act}%'");
+            $this->whereAdd("{$tn}.action LIKE '%{$act}%'");
         }
         
         if(!empty($q['query']['on_table'])) {
             $tnb = $this->escape($q['query']['on_table']);
         }
         
         if(!empty($q['query']['on_table'])) {
             $tnb = $this->escape($q['query']['on_table']);
-            $this->whereAdd("Events.on_table LIKE '%{$tnb}%'");
+            $this->whereAdd("{$tn}.on_table LIKE '%{$tnb}%'");
         } 
         
     }
         } 
         
     }