From 462a3cf5a0c332d06f9bb24d7bc4024627618caf Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Mon, 18 Jun 2012 13:30:56 +0000 Subject: [PATCH] // now migrate_orders will works also without pdo ... thanks again to rGaillard \! --- install-dev/upgrade/php/migrate_orders.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install-dev/upgrade/php/migrate_orders.php b/install-dev/upgrade/php/migrate_orders.php index 2f6d6e76e..acc98c5f3 100644 --- a/install-dev/upgrade/php/migrate_orders.php +++ b/install-dev/upgrade/php/migrate_orders.php @@ -37,11 +37,14 @@ function migrate_orders() // init insert order detail query $values_order_detail = array(); - $col_order_detail = Db::getInstance()->query('SHOW FIELDS FROM `'._DB_PREFIX_.'order_detail`'); + $col_order_detail = Db::getInstance()->executeS('SHOW FIELDS + FROM `'._DB_PREFIX_.'order_detail`'); + foreach($col_order_detail as $k => $field) + $col_order_detail[$k] = $field['Field']; + if (!$col_order_detail) return array('error' => 1, 'msg' => 'unable to get fields list from order_detail table'); - $col_order_detail = $col_order_detail->fetchAll(PDO::FETCH_COLUMN); $insert_order_detail = 'INSERT INTO `'._DB_PREFIX_.'order_detail_2` (`'.implode('`, `', $col_order_detail).'`) VALUES '; // init insert order query