magento orders list query

后端 未结 3 1426
[愿得一人]
[愿得一人] 2020-12-29 17:09

I want to select the list of all orders in Magento.

This is required for me to show the list of all the orders from magento in another PHP application presently I\

3条回答
  •  囚心锁ツ
    2020-12-29 17:39

    Try this:

    select * from sales_flat_order;
    

    That's header-level information. If you require line-item information / deeper information, you might use something like the following join:

    select e.*,sfoi.* from sales_flat_order e
    left join sales_flat_order_item sfoi on (e.entity_id=sfoi.order_id)
    

    Now, this is going to duplicate (cartesian product) all of the header information along with the line-item information. If you require something further, let me know, I'm a master at Magento EAV SQL :)

提交回复
热议问题