function fill_in_additional_detail_fields() { $query = "SELECT u1.first_name, u1.last_name from vtiger_users u1, vtiger_users u2 where u1.id = u2.reports_to_id AND u2.id = ? and u1.deleted=0"; $result = $this->db->pquery($query, array($this->id), true, "Error filling in additional detail vtiger_fields"); $row = $this->db->fetchByAssoc($result); $this->log->debug("additional detail query results: {$row}"); if ($row != null) { $this->reports_to_name = stripslashes(getFullNameFromArray('Users', $row)); } else { $this->reports_to_name = ''; } }