Load Billing Address First Then Shipping in Magento 1.9

billing-addressmagento-1.9shipping-address

I've been trying for hours to load the billing address from the sales_flat_order_address table then I would like to get the shipping address but for some reason the shipping loads first.

I'm using the parent_id to load the model and I'd expect the billing row to load first but it isn't. For some reason it skips over the billing address and loads the shipping data first then come back for the billing address after.

Does anyone know what I'm doing wrong here?

enter image description here

Best Answer

this is how you get the billing addess

$orderdata = Mage::getModel('sales/order')->load(212295);
$billingAddress = $orderdata->getBillingAddress();
$address=$billingAddress->getStreet();
echo $address[0];