public static function getDataFunctionMergeMapping(&$arrRows, &$arrResults, &$arrMapping, $arrRowsAdditonalKey = null)
    {
        if (is_array($arrResults))
        {
            foreach($arrResults as $mapId => $arrResult)
            {
                if (isset($arrMapping[$mapId]) && is_array($arrMapping[$mapId]))
                {
                    foreach($arrMapping[$mapId] as $rowId)
                    {
                        if (isset($arrRows[$rowId]))
                        {
                            if (isset($arrRowsAdditonalKey))
                                $arrRows[$rowId][$arrRowsAdditonalKey] = $arrResult;
                            else
                                $arrRows[$rowId] = array_merge($arrResult, $arrRows[$rowId]);
                        }
                    }
                }
            }
        }    
    }
public static function getDataFunctionMergeMapping(&$arrRows, &$arrResults, &$arrMapping, $arrRowsAdditonalKey = null)
    {
        if (is_array($arrResults))
        {
            foreach($arrResults as $mapId => $arrResult)
            {
                if (isset($arrMapping[$mapId]) && is_array($arrMapping[$mapId]))
                {
                    foreach($arrMapping[$mapId] as $rowId)
                    {
                        if (isset($arrRows[$rowId]))
                        {
                            if (isset($arrRowsAdditonalKey))
                                $arrRows[$rowId][$arrRowsAdditonalKey] = $arrResult;
                            else
                                $arrRows[$rowId] = array_merge($arrResult, $arrRows[$rowId]);
                        }
                    }
                }
            }
        }    
    }
public static function getDataFunctionMergeMapping ( & $ arrRows , & $ arrResults , & $ arrMapping , $ arrRowsAdditonalKey = null ) { if ( is_array ( $ arrResults ) ) { foreach ( $ arrResults as $ mapId => $ arrResult ) { if ( isset ( $ arrMapping [ $ mapId ] ) && is_array ( $ arrMapping [ $ mapId ] ) ) { foreach ( $ arrMapping [ $ mapId ] as $ rowId ) { if ( isset ( $ arrRows [ $ rowId ] ) ) { if ( isset ( $ arrRowsAdditonalKey ) ) $ arrRows [ $ rowId ] [ $ arrRowsAdditonalKey ] = $ arrResult ; else $ arrRows [ $ rowId ] = array_merge ( $ arrResult , $ arrRows [ $ rowId ] ) ; } } } } } }
Helper function that merge mapping ids to arrRows

@param array $arrRows
@param array $arrResults sql results from $arrIds/$strIds usually. The key of this array is the $mapField from getDataFunctionIds()
@param array $arrMapping from getDataFunctionIds()
Helper function that merge mapping ids to arrRows