This topic is locked

Show data from master table on detail view/edit/add page snippet

11/26/2010 3:40:40 AM
PHPRunner General questions
S
smith author

I have a value to be shone in my add page.

I created the following script.

////////////////////////////////////////

global $dal, $strTableName;
echo "Master Info
";
if ($_SESSION[$strTableName."_masterkey1"])
{
$tblMaster = $dal->Table("inv_product");
$rs = $tblMaster->Query("Item_ID=".$_SESSION[$strTableName.
"_masterkey1"],"");
if ($data = db_fetch_array($rs))
{
echo "uom: ".$data["uom"]."
";
}
}

///////////////////////////

but the above works

my problem is the uom in the master table is normalized. I want the corresponding value of the uom to be shown in the add page.

for example

the master table uom field has a value of 3

it s view as kg. in the master table, but when fetches her it shows only 3. how to modify the value with view as field setting or something similar.