This topic is locked

Master table syntax

9/14/2009 12:53:12 PM
PHPRunner General questions
W
Wartech author

Anyone knows the syntax to call on a field from the master_table if I am in the child?

J
Jane 9/15/2009

Hi,
you can select master values in the custom event (Insert PHP code snippet option on the Visual Editor tab).

Here is a sample code:

global $strTableName,$dal;

$rstmp = $dal->MasterTableName->Query("MasterKey=".$_SESSION[$strTableName."_masterkey1"],"");

$datatmp = db_fetch_array($rstmp);

echo "Field1: ".$datatmp["Field1"]."
";

echo "Field2: ".$datatmp["Field2"]."
";



where Field1, Field2 and MasterKey are your actual field names, MasterTableName is your actual table name.

W
Wartech author 9/15/2009

Thanks