Skip to content
Advertisement

Updating stocks quantity in Product Table from Cart

Hello everyone so basically I have this 2 tables

ProductLists

and

Cart

Note: Cart table contains temporary datas inside it, if the orders inside cart table are already paid the table itself will truncate.

I tried running this query

JavaScript

and this happened output

any advice on how to do this without making the stocks of the other products go Null? Thank you very much

Advertisement

Answer

Try this for MSSQL:

JavaScript

For phpMyAdmin:

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