public function GetNextRecord()
 {
     if (!$this->FilesMerged) {
         $this->FilesMerged = TRUE;
         $this->JoinInputFiles();
         $this->CreateMySQLRawTable($this->TableName);
         $sqlStmt = "select SQL_NO_CACHE * from {$this->TableName}";
         $this->FeedsDbObj->SetUpSerialRead($sqlStmt);
     }
     $row = $this->FeedsDbObj->GetNextRow();
     /*
     if ($row === FALSE && $this->TableName == "TECHFEED" && $this->TotalProducts < 1000 && $this->TechSecondTime == FALSE) {
     	$this->TotalProducts = $this->ItemsWithErrors = 0;
     	$this->TechSecondTime = TRUE;
     	$sqlStmt = "select * from {$this->TableName}";
     	$this->FeedsDbObj->SetUpSerialRead($sqlStmt);
     	$row = $this->FeedsDbObj->GetNextRow();
     	echo "Had to redo Tech Feed as it had a premature end of file\n";
     }
     */
     if ($row === FALSE) {
         $this->WriteOutErrors();
         if ($this->IsMiniMSRP || $this->MiniFeed) {
             $this->ExecuteSaveMiniSQL();
         } else {
             $this->ExecuteSaveSQL();
         }
         foreach ($this->FilesToPurge as $File => $Ignore) {
             @unlink($File);
         }
         $CompleteFeed = TRUE;
         if (!is_null($this->MinimumRecords)) {
             $GoodRecords = $this->TotalProducts - $this->ItemsWithErrors;
             if ($GoodRecords < $this->MinimumRecords) {
                 $sqlStmt = "update Supplier_Control set Incomplete_Feed = 1 where Supplier_Party_ID = '{$this->PartyID}'";
                 $this->FeedsInsertObj->UpdateRow($sqlStmt);
                 $CompleteFeed = FALSE;
             }
         }
         if ($this->IsMiniMSRP === FALSE && $this->MiniFeed === FALSE) {
             $endTime = date("Y-m-d H:i:s");
             $elapsed = time() - $this->StartSeconds;
             if ($CompleteFeed) {
                 $FinalStatus = "Success";
             } else {
                 $FinalStatus = "Incomplete";
             }
             $sqlStmt = "update Supplier_History set Pull_End = '{$endTime}', Pull_Elapsed = {$elapsed}, Total_Products = {$this->TotalProducts}, Product_Errors = {$this->ItemsWithErrors}, Supplier_Status = '{$FinalStatus}' where Supplier_Party_ID = '{$this->PartyID}' and Load_ID = {$this->LoadID}";
             $this->FeedsInsertObj->UpdateRow($sqlStmt);
             $socket = socket_create(AF_UNIX, SOCK_STREAM, 0);
             if (@socket_connect($socket, Config::GetFeedSocket(), 0) === FALSE) {
                 trigger_error("Can't connect to socket file", E_USER_ERROR);
             }
             $pid = getmypid();
             socket_write($socket, pack('N', strlen($pid)) . $pid);
             socket_close($socket);
         }
         return FALSE;
     }
     $this->TotalProducts++;
     // Clear out all our product attributes
     $this->ManufacturerSKU = NULL;
     $this->CleanMfrSKU = NULL;
     $this->UPC = NULL;
     $this->SupplierSKU = NULL;
     $this->ManufacturerName = NULL;
     $this->OfbizMfrName = NULL;
     $this->ManufacturerID = NULL;
     $this->ProductName = NULL;
     $this->SupplierProductName = NULL;
     $this->MarketingDescription = NULL;
     $this->TechnicalDescription = NULL;
     $this->SupplierPrice = NULL;
     $this->Weight = NULL;
     $this->MSRP = NULL;
     $this->MAP = NULL;
     $this->InsideDeliveryCharge = NULL;
     $this->OutsideDeliveryCharge = NULL;
     $this->WholesalePrice = NULL;
     $this->PromoPrice = NULL;
     $this->Categories = NULL;
     $this->CategoryID = NULL;
     $this->Length = NULL;
     $this->Width = NULL;
     $this->Height = NULL;
     $this->Restricted = FALSE;
     $this->MainImage = NULL;
     $this->AlternateImage = NULL;
     $this->ImageReferrer = NULL;
     $this->Returnable = TRUE;
     $this->Refurbished = FALSE;
     $this->Warranty = NULL;
     $this->InventoryData = NULL;
     $this->IsQty5Supplier = FALSE;
     $this->TotalQuantity = 0;
     $this->VirtualInventory = NULL;
     return $row;
 }