I am not sure if this is a bug or not. but i face this problem, and I do not know how to solve it because I’m still a beginner in php and scriptcase. I really appreciate everyone help.
I want to run this in “onValidateSuccess” Event just like the demonstrator did in this tutorial Scriptcase Applications - Control - YouTube at timestamp 4:15
$sql=“UPDATE products SET quantityInStock = quantityInStock - “.{qty}.” WHERE productCode=”.{productCode};
sc_exec_sql($sql);
sc_alert(“Inventory updated successfully!”);
but when i click submit on my application, the screen turn blank.
its weird because the sc_alert work just fine if i run that line alone…
*quantityInStock is the field name in my database
*qty is the field name in my scriptcase application
the logic is i want to update my product stock after selling the product to customer…
quantityInStock holds the number of stock the product has
qty holds the number of product sold to customer