I want to update the inventory of all My Magento products.
Can I do that with an only sql request?
What\'s the request if that\'s possible ?
Thanks
function updateProductStock($productId, $qty) { $resource = Mage::getSingleton('core/resource'); $write = $resource->getConnection('core_write'); $write->update( "cataloginventory_stock_item" , array("qty" => $qty, 'is_in_stock' => ($qty > 0 ? 1 : 0)) , "product_id = " . $productId ); }