projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68e7edd
)
dev/core#2272 Fix a DB error when merging contacts into the same household on contact...
author
Seamus Lee
<seamuslee001@gmail.com>
Wed, 23 Dec 2020 20:26:49 +0000
(07:26 +1100)
committer
Seamus Lee
<seamuslee001@gmail.com>
Wed, 23 Dec 2020 20:26:49 +0000
(07:26 +1100)
CRM/Export/BAO/Export.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Export/BAO/Export.php
b/CRM/Export/BAO/Export.php
index 575aa9af24cd371605850266ca71f8e0ec607566..3f0f57a3fc22b1e4d9b58684cf738e2417a49b68 100644
(file)
--- a/
CRM/Export/BAO/Export.php
+++ b/
CRM/Export/BAO/Export.php
@@
-438,7
+438,11
@@
VALUES $sqlValueString
$relationshipJoin = $relationshipClause = '';
if (!$selectAll && $componentTable) {
- $relationshipJoin = " INNER JOIN {$componentTable} ctTable ON ctTable.contact_id = {$contactA}";
+ $field = 'contact_id';
+ if ($componentTable === 'civicrm_contact') {
+ $field = 'id';
+ }
+ $relationshipJoin = " INNER JOIN {$componentTable} ctTable ON ctTable.$field = {$contactA}";
}
elseif (!empty($relIDs)) {
$relID = implode(',', $relIDs);