Skip to content
Snippets Groups Projects
Commit abf68660 authored by Uma's avatar Uma
Browse files

Merge branch 'cleanup_buildSearchQueryForFieldTypes' into '7.4.0'

Fixes #1546 CRMEntity buildSearchQueryForFieldTypes() api cleanup

See merge request !778
parents 54cc1fec 065ce9b4
No related branches found
No related tags found
No related merge requests found
......@@ -2653,12 +2653,20 @@ class CRMEntity {
}
}
$query = "select crmid as id ";
$entityfields = getEntityField($module);
$querycolumnnames = implode(',', $lookupcolumns);
$entitycolumnnames = $entityfields['fieldname'];
$query = "select crmid as id, $querycolumnnames, $entitycolumnnames as name ";
$log->fatal('$entitycolumnnames');
$log->fatal($entitycolumnnames);
if(!empty($querycolumnnames)){
$query .= ", $querycolumnnames";
}
if(!empty($entitycolumnnames)){
$query .= ", $entitycolumnnames as name ";
}
$query .= " FROM $this->table_name ";
$query .=" INNER JOIN vtiger_crmentity ON $this->table_name.$this->table_index = vtiger_crmentity.crmid AND deleted = 0 ";
$query .= " INNER JOIN vtiger_crmentity ON $this->table_name.$this->table_index = vtiger_crmentity.crmid AND deleted = 0 ";
//remove the base table
$LookupTable = array_unique($lookuptables);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment