<?php
$mysqli = new mysqli("localhost", "dmcentra_dmsc", "uGlG?gXfMhA1", "dmcentra_sc");
$result = $mysqli->query("SELECT * FROM pricefile"); 
$si = 0;
$no = 0;
while ($row = $result->fetch_assoc()) {
		
		$isFile = is_file("images/".$row["SKU"].".jpg");
		if ($isFile) {
			$si++;
			$mysqli->query("UPDATE pricefile SET hasImagePhysical = 1 WHERE id = ".$row["id"]); 
		}else{
			$no++;
			$mysqli->query("UPDATE pricefile SET hasImagePhysical = 0 WHERE id = ".$row["id"]); 
		}
}
echo $si;
echo "<br>";
echo $no;
?>