Being so green with php and mysql I am struggling to automatically update some fields when i am entering an order.
I have three tables - contacts, orders, and products
I have been using valuelists to pull products - prodcode,product,price into the orders table with an autocomplete widget.
I am trying to figure out how to use a beforeinsert trigger or widget to automatically fill in the product and price fields once a product code is entered into the prodcode field.
I have been attempting quite a few variations with sql and function_beforeinsert(), but have been unsuccessful.
Any examples or assistance would be greatly appreciated.
Thanks