Skip to content
Advertisement

I have a services table,service has a price, in new order should i save total amount of order or calculate every time services table

do i need to save order amount in orders table or i can calculate everytime from services table against each order ID?

Advertisement

Answer

Just create a view of the orders table joined with the services table with the calculation you want against each orderID?

If you want more details on how to do this then include the minimal data to help out:
Table names, column names, example data.

but if you know how to create views then this should suit your needs.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement