W
|
WilliamBDevClub member 5/7/2019 |
Have you tried
|
R
|
roeland author 5/7/2019 |
Have you tried
|
R
|
roeland author 5/7/2019 |
In the meantime I tried many different things. But always the same result: |
A
|
acpan 5/7/2019 |
Assumming you are working on another table and after updating it, you want to update another 2 tables: order and orderinhoud in the background. |
R
|
roeland author 5/8/2019 |
Assumming you are working on another table and after updating it, you want to update another 2 tables: order and orderinhoud in the background. Your query statement itself that you update 2 tables at one go is quite dangerious practice in my view and hard to troubleshoort when there is problem (like in this case). For readability and ease of troubleshooting, you maybe need to break the update query into 2 parts, so in after update event of the form, try this: $orderbevestiging = $values['orderbevestiging']; $id = $values['id']; // do your checking for empty or null field here, then update accordingly if ($values['orderbevestiging'] == "" OR $values['orderbevestiging'] == NULL) { $sql = "UPDATE order SET orderbevestiging = '$orderbevestiging' WHERE orderid= $id ";db_exec($sql); } else { $sql = "UPDATE order SET orderbevestiging = '$orderbevestiging' WHERE orderid= $id ";db_exec($sql); $sql = "UPDATE orderinhoud SET orderbevestiging = '$orderbevestiging' WHERE orderid= $id ";db_exec($sql); } Hope it helps ACP
|
A
|
acpan 5/8/2019 |
Hi,
|