<?php

require_once("./DB/config.php");

$rlt = mysql_query("SELECT * FROM phppos_items WHERE item_number IS NULL");
$n = 1;
while($row = mysql_fetch_array($rlt)){

	$item_id = $row['item_id'];
	 
	 mysql_query("UPDATE phppos_items SET item_number='$item_id' WHERE item_id='$item_id'");

++$n;

}

echo $n." Records were updated"

?>

