function MapSField($_fieldFormName, $_fieldDbName='', $_refTable, $_refAlias, $_refCondition, $_mapId=false)
{
- if ($_mapId === false)
- $this->mapId = Env::get($_fieldFormName);
- else
- $this->mapId = $_mapId;
- $this->RefSField($_fieldFormName, $_fieldDbName, $_refTable, $_refAlias, $_refCondition, true, false);
+ if ($_mapId === false)
+ $this->mapId = Env::get($_fieldFormName, '');
+ else
+ $this->mapId = $_mapId;
+ $this->RefSField($_fieldFormName, $_fieldDbName, $_refTable, $_refAlias, $_refCondition, true, false);
}
function get_select_statement()
{
+ if ($this->mapId === '') return false;
$res = implode(' OR ', array_filter(array_map(array($this, 'get_single_match_statement'), $this->fieldDbName)));
foreach ($this->refTable as $i => $refT)
$last = $i;
}
function get_request()
{
- $this->value = $this->mapId;
+ $this->value = $this->mapId;
}
}