0

I am having puchased item id and I need to grab order details in magento 1 Can anybody please help?

2

2 Answers 2

2

You can do it by magento way:

$orderItem = Mage::getModel('sales/order_item')->load(259283);
echo $orderItem->getOrderId();
1
  • I have update my answer as per your sql. Jun 12, 2018 at 6:25
0

ok I got it.. by this

SELECT order_id FROM `sales_flat_order_item` WHERE `item_id` = 259283
1
  • why you want to write the sql this way , Magento have its own predefined getters
    – inrsaurabh
    Jun 12, 2018 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.