$this->selectAdd();
$this->selectAs();
- $this->selectAs($jt, 'person_id_%s', 'join_person_id_id');
+ $this->selectAs($jt, 'person_id_%s', 'join_person_id_id_2');
if (method_exists($jt,'nameColumn')) {
$this->selectAdd("join_person_id_id.{$jt->nameColumn()} as person_id_name");
if (!$au->hasPerm("Admin.Admin_Tab", 'S')) {
//DB_DataObject::DebugLevel(1);
// they can only view their changes..
- $this->person_id = $au->id;
+ $this->whereAdd("($tn.person_id = {$au->id} OR $tn.person_id = 0)");
+// $this->person_id = $au->id;
}
// _join = tablename,tablename...