J
|
Jane 5/21/2007 |
Tom, ... $str1 = "select from wire_transfer_details where Wire_Transfer_ID='".$values["Wire_Transfer_ID"]."'"; echo $str1; .... //List all transactions within those group payments $str1 = "select from group_payment where Group_Payment_ID='".$wire_transfer_details_table["Group_Payment_ID"]."'"; echo $str1; ... |
A
|
amannerud author 5/21/2007 |
Hi Jane, |
J
|
Jane 5/22/2007 |
Tom, global $conn; if ($values["Submitted"]==True) { $str = "select Order_ID from Order where ".$where; $rs = db_query($str,$conn); while ($data = db_fetch_array($rs)) { $str2 = "update Order_Details set Submitted=True where Order_ID=".$data["Order_ID"]; db_exec($str2,$conn); } } |
A
|
amannerud author 5/22/2007 |
Thank you very much for all the help. The sample snippet worked great! You guys are rock stars! |
M
|
mrpeeble 8/17/2007 |
I am trying to do something similar, when I edit a field in the Master table I want to update a field in a Child1 table. |
J
|
Jane 8/17/2007 |
Hi, |
M
|
mrpeeble 8/17/2007 |
i uploaded project to demo account: Hi, it's difficult to tell you what's happening without seeing actual files. Please publish your project on Demo Account and post here a URL to your pages along with instructions on reproducing this error. I'll find what's wrong with your project inspecting it at Demo account site. |
![]() |
Sergey Kornilov admin 8/17/2007 |
You have an extra closing curly bracket in your event. Just remove it. |
M
|
mrpeeble 8/17/2007 |
You have an extra closing curly bracket in your event. Just remove it.
|
![]() |
Sergey Kornilov admin 8/17/2007 |
There was an extra closing bracket in your event code. I removed it on your Demo Account and it works now. |
M
|
mrpeeble 8/21/2007 |
There was an extra closing bracket in your event code. I removed it on your Demo Account and it works now. Open include/master_events.php file in Notepad to see what I mean.
|
J
|
Jane 8/21/2007 |
Hi, function BeforeEdit(&$values, $where) { global $conn; if ($values["Terminated"]==101) { $str = "select ID from Master where ".$where; $rs = db_query($str,$conn); while ($data = db_fetch_array($rs)) { $str2 = "update `child1` set `Terminated`='101' where `MasterID`=".$data["ID"]; db_exec($str2,$conn); } } return true; } // function BeforeEdit |
M
|
mrpeeble 8/21/2007 |
Hi, this error happens because terminated is reserved word in the MySQL. You need to add backquotes to your SQL query. Here is the correct code:
|