This topic is locked
[SOLVED]

 Access MasterTable field

11/5/2010 3:12:10 PM
PHPRunner General questions
A
almeida author

Hi,
Anyone knows how can I access a field from the mastertable in the detail list page?
Thanks.

Sergey Kornilov admin 11/8/2010

You will need to execute a query that pulls data from the master table.
Example:

$sql = "select SomeFieldfrom MasterTablewhere MasterTableID= " . $_SESSION["CurrentTable_masterkey1"];

$rs = CustomQuery($sql);

$data = db_fetch_array($rs);

echo $data["SomeField"];


Replace names in bold with the actual field and table names.

A
almeida author 11/8/2010

Tks..