Quellcode durchsuchen

BiAuditGenerate - poprawka wydannościowa

Mariusz Muszyński vor 8 Jahren
Ursprung
Commit
ace1d00ff1
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      SE/se-lib/Route/UrlAction/BiAuditGenerate.php

+ 3 - 3
SE/se-lib/Route/UrlAction/BiAuditGenerate.php

@@ -1453,7 +1453,7 @@ Router::getRoute("UrlAction_BiAuditGenerate")->' . $function . ';
 		];
 
 		$query = "select * from `BI_audit_ENERGA_PRACOWNICY_import` where `importResult` = 'none'";
-		$pracownicy = DB::getPDO()->query($query);
+		$pracownicy = DB::getPDO()->queryNotBuffered($query);
 		while ($pracownik = $pracownicy->fetch()) {
 			$ID_pracownik = DB::getPDO()->fetchValue("select `ID` from `BI_audit_ENERGA_PRACOWNICY` where `pesel` = '{$pracownik['pesel']}'");
 			$sqlArr = [];
@@ -1801,7 +1801,7 @@ SQL;
 			$insertFields = "`" . implode("`, `", array_keys($tableConf['fieldsTeryt'])) . "`";
 			$selectFields = "`" . implode("`, `", $tableConf['fieldsTeryt']) . "`";
 
-			$adresy = DB::getPDO()->query($query);
+			$adresy = DB::getPDO()->queryNotBuffered($query);
 			while ($adres = $adresy->fetch()) {
 				DB::getPDO()->query("delete from `{$refTable}` where `PRIMARY_KEY` = '{$adres['ID']}'");
 
@@ -2092,7 +2092,7 @@ SQL;
 		}
 
 		$BiAuditRelations = new BiAuditRelations();
-		$result = DB::getPDO()->query("select `ID` from `BI_audit_ALL` where `reffed` = 0 order by `ID`");
+		$result = DB::getPDO()->queryNotBuffered("select `ID` from `BI_audit_ALL` where `reffed` = 0 order by `ID`");
 		while ($row = $result->fetch()) $BiAuditRelations->findRelations($row['ID']);
 		DB::getPDO()->query("update `BI_audit_ALL` set `reffed` = 1");
 	}