![]() |
Sergey Kornilov admin 5/31/2007 |
I think you need to write a BeforeAdd event to retrieve a list of smaller parts for each part, combine everything into a message body and email it. |
G
|
Greeham author 6/1/2007 |
I think you need to write a BeforeAdd event to retrieve a list of smaller parts for each part, combine everything into a message body and email it.
|
J
|
Jane 6/1/2007 |
Hi, |
G
|
Greeham author 12/14/2007 |
Hi, it's difficult to write event code without your actual data. Please post here structure of your tables and detailed description of what you want to achieve. I'll try to help you.
|
J
|
Jane 12/14/2007 |
Greeham, global $conn; $str = "select part_name from spares where part_no=".$values["part_no"]; $rs = db_query($str,$conn); $data = db_fetch_array($rs); $email="test@test.com"; $message=""; $subject="New data record"; foreach($values as $field=>$value) $message.= $field." : ".$value."\r\n"; $message.= "Part Name: ".$data["part_name"]."\r\n"; mail($email, $subject, $message); |
G
|
Greeham author 12/14/2007 |
Hi Jane, |
J
|
Jane 12/14/2007 |
Greeham, global $conn $str = "select * from MainTable where part_no=".$values["part_no"]; $rs = db_query($str); $data = db_fetch_array($rs);
|