PDO::ERRMODE_EXCEPTION] ); $count = (int)$pdo->query( "SELECT COUNT(*) FROM tx_vitec_domain_model_product WHERE deleted = 0 AND subproduct = 1" )->fetchColumn(); echo "Records with subproduct=1: " . $count . "\n"; $stmt = $pdo->prepare("UPDATE tx_vitec_domain_model_product SET subproduct = 0, tstamp = ? WHERE deleted = 0 AND subproduct = 1"); $stmt->execute([time()]); echo "Cleared " . $stmt->rowCount() . " flag(s). Flush the cache: vendor/bin/typo3 cache:flush\n";