Magento get payment method name with query
When payment method in your website was deleted, orders were using there payment method will show to error page when you go to order detail page in admin.
Simple, these orders can’t get info from there payment method.
You not also access to Payment method manage to checking. Have only case to check it.
It’s check by query.
All we need is ID orders:
Example: I have 2 ID order is: 100016521 and 1300000095
I will add these ID orders to query SQL below
SELECT so.`increment_id` as order_id, pm.`method` as payment_method, pm.`parent_id`
from `sales_flat_order` so, `sales_flat_order_payment` pm
where so.`entity_id` = pm.`parent_id` and so.`increment_id` in (100016521, 1300000095);
Result with software connect to SQL server:
Also you use query without software, please refer this link