Hi,

I need to update the product quantity in the product table according to the quantity which the customers ordered...Since I am new to this field I dont know how to do it with a query.

This is what I want to do in more details.As the administrator checks for new order ,he may accept selected orders from the list.I want to update the product quantity according to that orders which the administrator accepted...

Can someone help me to do this??

Thanks alot

You need something like that:

update products set quantity = quantity - quvalue_from_admin_list 
  where id_quantity = idvalue_from_admin_list

Obviously, in PHP code from your other posting you also need to replace INSERT by above UPDATE ...

-- tesu

Can you please give me the query..:)

I want to update multiple products in product table according to the check boxes which the administrator select..I think need to take the SUM quantity from the ordered items which is ORDER BY quantity..Isn't it??

I dont know how to write the query

If you dont mind post me a query here..Great Help..Thanks alot

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.