getting data from master table in adding process |
2/22/2008 2:19:33 PM |
PHPRunner General questions | |
A
adrian trujillo author
Is there a direct way to get the field values from master table (not the masterkeys) when I am adding a detail record ... and use them to fill some other fields in the detail record before to display add window ? . |
|
A
|
amuro 2/25/2008 |
If the field is recorded in SESSION, you are able to get its value directly. |
![]() |
Alexey admin 2/26/2008 |
Hi, $sql = "select * from mastertable where id=".$_SESSION[$strTableName."_masterkey1"]; $rs = db_query($sql,$conn); $data = db_fetch_array($rs); $_SESSION["Field1"] = $data["Field1"]; $_SESSION["Field2"] = $data["Field2"]; ... |