本文整理匯總了PHP中UserFactory::StartTransaction方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserFactory::StartTransaction方法的具體用法?PHP UserFactory::StartTransaction怎麽用?PHP UserFactory::StartTransaction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserFactory
的用法示例。
在下文中一共展示了UserFactory::StartTransaction方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
foreach ($mapped_row as $column => $value) {
echo " {$column}: {$value}\n";
}
$i++;
}
}
unset($import_arr, $mapped_row, $column, $value, $tmp_import_arr, $i);
}
//Import all data
$import_arr = Misc::parseCSV($import_csv_file, TRUE, FALSE, ",", 9216, 0);
if (!is_array($import_arr)) {
echo "Parsing CSV file failed!\n";
} else {
echo "Importing Users...\n";
$uf = new UserFactory();
$uf->StartTransaction();
$commit_trans = TRUE;
$i = 1;
$e = 0;
foreach ($import_arr as $tmp_import_arr) {
$mapped_row = Misc::importApplyColumnMap($filtered_import_map, $tmp_import_arr);
if ($i == 1 and $mapped_row['company_id'] > 0) {
$clf = new CompanyListFactory();
$clf->getById($mapped_row['company_id']);
if ($clf->getRecordCount() > 0) {
echo 'Company: ' . $clf->getCurrent()->getName() . "\n";
ob_flush();
flush();
sleep(2);
}
unset($clf);