// if not empty on_table
if(!empty($q['person_table'])){
$jt = DB_DataObject::factory($q['person_table']);
- print_R($jt->keys());exit;
- $this->_join = "LEFT JOIN {$jt->tableName()} AS join_person_id_id ON (join_person_id_id.{$jt->pid()}=Events.person_id)";
+
+ $keys = $jt->keys();
+
+ $this->_join = "LEFT JOIN {$jt->tableName()} AS join_person_id_id ON (join_person_id_id.{$keys[0]}=Events.person_id)";
$this->selectAdd();
$this->selectAs();