View difference between Paste ID: gtpDbsbR and vS87NAJL
SHOW: | | - or go back to the newest paste.
1
<?php
2
3
// Get SQL Resource & Read Connection
4
$resource = Mage::getSingleton('core/resource');
5
$readConnection = $resource->getConnection('core_read');
6
$sales_order_table = $resource->getTableName('sales/order');
7
8
// Within Foreach Loop
9
// Get Order Id from Increment Id (e.g. 100001234)
10
$order_id = $readConnection
11-
->fetchOne("SELECT `entity_id` FROM `". $sales_order_table ."` WHERE `increment_id` = '100001234'");
11+
->fetchOne("SELECT `entity_id` FROM `". $sales_order_table ."` WHERE `increment_id` = '100001234'");
12
13
?>