1 && $i != $numValues-1) { $sql .= "select fieldlabel,fieldname,typeofdata from field where tablename='".$tablearray[$i] ."'and tabid=10 and displaytype <> 2 union "; } else { $sql .= "select fieldlabel,fieldname,typeofdata from field where tablename='".$tablearray[$i] ."' and tabid=10 and displaytype <> 2 "; } } else { if($numValues > 1 && $i != $numValues-1) { $sql .= "select fieldlabel,fieldname,typeofdata from field where tablename='".$tablearray[$i] ."'".$tab_con." and displaytype in (1,3) union "; } else { $sql .= "select fieldlabel,fieldname,typeofdata from field where tablename='".$tablearray[$i] ."'".$tab_con." and displaytype in (1,3)"; } } } $result = $adb->query($sql); $noofrows = $adb->num_rows($result); $fieldName_array = Array(); for($i=0;$i<$noofrows;$i++) { $fieldlabel = $adb->query_result($result,$i,'fieldlabel'); $fieldname = $adb->query_result($result,$i,'fieldname'); $typeofdata = $adb->query_result($result,$i,'typeofdata'); //echo '
'.$fieldlabel.'....'.$fieldname.'....'.$typeofdata; $fldLabel_array = Array(); $fldLabel_array[$fieldlabel] = $typeofdata; $fieldName_array[$fieldname] = $fldLabel_array; } return $fieldName_array; } ?>