This topic is locked

update multiply values Master / Detail

6/3/2008 1:42:42 AM
PHPRunner General questions
C
ckapote author

Hi ,
I have a master table named tblmain
id

Name

Tel

Type
and a detail table named tblreq
Id

View

How

Type

connect
I need a script when the value in type field of master table is updated/change all related type fields of detail table where the master id=connect to be updated accordingly .
Please help
thanks

J
Jane 6/4/2008

Chris,
use Before record updated event on the Events tab for this purpose.

Here is a sample:

global $conn;

$strUpdate = "update tblreq set Type='".$values["Type"]."' where connect=".$keys["id"];

db_exec($strUpdate,$conn);