Issue Bug Closed

#17341Fieldmapping doesnt work on the "right side" in where clause with table.field

Sebastian Fischer 05/30/07, 14:46 updated 11/24/09, 22:51

Description

When table.field is given in a where clause on the right side, the mapping doesnt work.

// do we have a field name in the value?
// this is a very simplistic check, beware
if (!is_numeric($sqlPartArray[$k][‘value’]0) && !isset($sqlPartArray[$k][‘value’]1)) {
$fieldArray = explode(‘.’, $sqlPartArray[$k][‘value’]0);
if(count($fieldArray)==1 && isset($this->mapping[$t][‘mapFieldNames’][$fieldArray0])) {
$sqlPartArray[$k][‘value’]0 = $this->mapping[$t][‘mapFieldNames’][$fieldArray0];
} elseif(count($fieldArray)==2 && isset($this->mapping[$fieldArray0][‘mapFieldNames’][$fieldArray1])) {
$sqlPartArray[$k][‘value’]0 = $this->mapping[$fieldArray0][‘mapTableName’].’.’.$this->mapping[$fieldArray0][‘mapFieldNames’][$fieldArray1];
}
}
(issue imported from #M5708)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.