Hi there,
I am developing shopping cart website using php pdo.
what i want, stock quantity has to decrease when an order is placed.

Give me some idea guys.

Recommended Answers

All 2 Replies

Design your database with stock_id,stock_count fields, when the order placed, past the stock_id and use the query update stock set stock = stock - 1 where stock_id = $stock_id

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.