I have a site with only 5 products (they will change regularly but the product ID will remain the same as I'll just be changing the detail). I want to be able to change, in bulk, the status for each product from
"pending" to "processed".
I've seen the SQL query to change ALL pending products to processed so can someone tell me what string I need to add to apply to specific product ID?
This is what I think will do it for all products:
UPDATE orders SET orders_status=2 WHERE orders_status=1
INSERT INTO orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments)
VALUES ($id, 2, '2010-03-03 23:00:00', 0, 'order status was changed to History by Admin')
So do I need something like
(excuse my lack of SQL knowledge):
UPDATE orders SET orders_status=2 FOR products_id=6 WHERE orders_status=1
INSERT INTO orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments)
VALUES ($id, 2, '2010-03-03 23:00:00', 0, 'order status was changed to History by Admin')
And one more thing. Instead of the hardcoded date, what string variable can I insert to use that day's date instead: "'DATETIME: Auto NOW()', NOW()"?
Bookmarks