Magento Version: 188.8.131.52
More modern version of Magento have abandoned the EAV storage method for sales order information. Don’t worry, there’s still plenty of linked tables to trip you up!
One of the most common misunderstandings I’ve seen is that there’s two tables that store primary order information. The more commonly discovered table is
sales_flat_order_grid. This is the table that’s used to display grid information in the Magento admin. However, it’s not the “true” place orders are stored.
That real central orders table is
sales_flat_order. This is a little trickier than the other table relationships, because the primary key for
sales_flat_order_grid is also a foreign key to
sales_flat_order’s primary key. Because most MySQL tools don’t do a good job of advertising foreign key relationships via casual table browsing, I’ve seen a lot of people discover the
entity_id key on
sales_flat_order_grid and assume it’s the one true table.
Yet another reason you want to interact with Magento’s information via the Model layer unless you’re really sure you know what you’re doing.