// fix fatal error on installer when show columns error in migrate_orders, thanks to Rémi :)
This commit is contained in:
@@ -39,7 +39,10 @@ function migrate_orders()
|
|||||||
$values_order_detail = array();
|
$values_order_detail = array();
|
||||||
$col_order_detail = Db::getInstance()->query('SHOW FIELDS FROM `'._DB_PREFIX_.'order_detail`');
|
$col_order_detail = Db::getInstance()->query('SHOW FIELDS FROM `'._DB_PREFIX_.'order_detail`');
|
||||||
if (!$col_order_detail)
|
if (!$col_order_detail)
|
||||||
|
{
|
||||||
$array_errors[] = 'unable to get fields list from order_detail table';
|
$array_errors[] = 'unable to get fields list from order_detail table';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$col_order_detail = $col_order_detail->fetchAll(PDO::FETCH_COLUMN);
|
$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 ';
|
$insert_order_detail = 'INSERT INTO `'._DB_PREFIX_.'order_detail_2` (`'.implode('`, `', $col_order_detail).'`) VALUES ';
|
||||||
|
|||||||
Reference in New Issue
Block a user